Commit Graph

8 Commits

Author SHA1 Message Date
Christian Rinderknecht
f795f1216a Bug fixing in the lexers and the parser. Started AST pretty-printer.
LexToken, AST: Tiny refactoring.

Bug: Added the making of the AST node PBytes.

Parser: The rule "pattern" was not properly stratified (the
constructor "PCons" was always produced, even when no consing was
done (now a fall-through to "core_pattern").

Bug: When sharing the lexers between Ligodity and Pascaligo, a
regression was introduced with the lexing of symbols. Indeed,
symbols specific to Ligodity (like "<>") and
Pascaligo (like "=/=") were scanned, but the
function "LexToken.mk_sym" for each only accepted their own,
yielding to an assertion to be invalidated. Fix: I created an
error "sym_err" now to gracefully handle that situation and
provide a hint to the programmer (to wit, to check the LIGO
syntax in use).

WIP: Started to write pretty-printing functions for the nodes of
the AST.

CLI: The option "--verbose=ast" now calls that function instead
of printing the tokens from the AST. When the pretty-printer is
finished, the option for printing the tokens will likely
be "--verbose=ast-tokens".
2019-10-12 23:42:26 +02:00
Christian Rinderknecht
bcf73d01bf Printing of tokens from the AST is now done in a Buffer.t 2019-10-09 16:07:13 +02:00
Tom Jack
36ec771adf Remove singleton inductive type 2019-10-07 16:54:28 +02:00
Tom Jack
1c2c6cbc43 Delete unused NoneExpr 2019-10-07 16:54:28 +02:00
Christian Rinderknecht
814a37b477 Merge remote-tracking branch 'origin/dev' into rinderknecht-dev 2019-09-27 14:35:47 +02:00
galfour
7974469159 remove fail 2019-09-26 19:30:17 +02:00
Christian Rinderknecht
68ff421b7d Merge remote-tracking branch 'origin/dev' into rinderknecht-dev 2019-09-26 17:11:08 +02:00
galfour
cdfffcf8ec more refactoring 2019-09-10 12:42:49 +02:00