Sizzle icon indicating copy to clipboard operation
Sizzle copied to clipboard

Parsing fails for proto tuples

Open psybers opened this issue 12 years ago • 0 comments

The parser fails to work on this (valid) input:

type Person = parsedmessage { username: string };

But it works fine on these inputs:

type Person = { username: string };

type Person = parsedmessage { };

Exception in thread "main" sizzle.parser.ParseException: Encountered " "type" "type "" at line 1, column 1. Was expecting one of: "$" ... "if" ... "do" ... "map" ... "for" ... "not" ... "when" ... "emit" ... "table" ... "while" ... "break" ... "proto" ... "protox" ... "array" ... "switch" ... "return" ... "result" ... "continue" ... "function" ... "parsedmessage" ... <INTEGER_LITERAL> ... <FLOATING_POINT_LITERAL> ... <STRING_LITERAL> ... <IDENTIFIER> ... "{" ... "(" ... "+" ... "-" ... "~" ... "!" ... "?" ... <IDENTIFIER> ...

at sizzle.parser.SizzleParser.generateParseException(SizzleParser.java:4967)
at sizzle.parser.SizzleParser.jj_consume_token(SizzleParser.java:4843)
at sizzle.parser.SizzleParser.Program(SizzleParser.java:74)
at sizzle.parser.SizzleParser.Start(SizzleParser.java:14)
at sizzle.compiler.SizzleCompiler.main(SizzleCompiler.java:179)

psybers avatar May 27 '12 18:05 psybers