Some issues with comments
$ aql2 --version
aql2 version: 0.0.0.r684.g1b14a3cd7
execute 2
execute 1
$ aql2 -f test.aql
2
1
execute 2
// execute 1
$ aql2 -f test.aql
2
0 [Common exception]: Mismatched set while expanding parse rule. Token is eos.
but
execute 2
// execute 1
execute 0
$ aql2 -f test.aql
2
0
The same happens even with /* */
. Seems like if the comment is the last thing in the file, it reports the mismatch. Probably the same bug as in the interactive mode (see below):
$ aql2
> /* this is a comment */ <NEWLINE>
+
+
+
Again, does not matter if //
or /* */
This works
$ aql2
> /* this is a comment */ execute 1
1
> /* comment */ execute 1 /* comment */
1
This does not, but this is expected I guess.
$ aql2
> /* this is a comment */ ; execute 1
0 [Common exception]: Mismatched set while expanding parse rule. Token is semicolon_sign.
Edited by Tomáš Pecka