Commit graph

8 commits

Author SHA1 Message Date
Sebastian Ullrich
8a02dfec4f feat: subsume variables under variable
/cc @leodemoura
2021-01-22 14:36:05 +01:00
Sebastian Ullrich
29c2023410 fix: adapt to new matchAlt syntax 2020-12-16 18:52:56 +01:00
Leonardo de Moura
db9e390b4d chore: remove new_frontend from tests 2020-10-25 09:16:38 -07:00
Leonardo de Moura
05e5d934d3 feat: change default precedence for new syntax
Now, the following example produces a syntax error.
```lean
macro "foo!" x:term : term => `($x + 1)

check id foo! 10
```

@Kha, I think the heuristic is simple and defensible.
If the new syntax starts and ends with token, than the precedence is
`maxPrec`. Otherwise, it is `leadPrec`.

see #180
2020-09-21 19:04:03 -07:00
Leonardo de Moura
dc9626ceab feat: try to improve weird error message
@Kha Before this commit, we were producing the error "expected command" at the `let` token
```lean
check id let x := 1; x
```
The new error is "expected command, but found term; this error may be
due to parsing precedence levels, consider parenthesizing the term".

The example above looks artificial, but it will happen all the time as
users start to define their own notation.
2020-09-21 18:29:01 -07:00
Leonardo de Moura
bc6dba89f3 chore: fix tests 2020-06-15 14:39:30 -07:00
Leonardo de Moura
f46dcd7a13 chore: fix some tests 2020-06-08 16:12:06 -07:00
Leonardo de Moura
63434fbb7d chore: add parser tests 2020-02-04 10:11:50 -08:00