facebookarchive/remodel

Parser rejects comments after %type directives

thurn opened this issue · 3 comments

thurn commented

The remodel parser rejects the following valid type definition:

%type name=FIGColorType library=FIGColor file=FIGColor canForwardDeclare=false

# Attributes of FIG Buttons
FIGButtonAttributes {
}

With the following error message:

[error][Tue Jan 23 2018 10:08:14 GMT-0800 (PST)] [/Users/dthurn/path/to/code/FIGButtonAttributes.value] (line 3, column 1) expected string matching {{}
expected string matching {,}
expected space
Successfuly generated 0 objects. Encountered 1 errors in other files

It should allow comments to be placed after %type directives.

(also: 'successfully' is spelled wrong, which always slightly annoys me?)

I just fixed the typo in 50ceb76. The parsing bug still exists though.

I have a fix for this. I will write some tests and put it up real soon now.

Very nice! Can you send a PR?