We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
we have another case where the completion context calculation is broken
here is the grammar
entry Model: (persons+=Person | greetings+=Greeting | structs+=Struct)*; Struct: "struct" name=ID '{' (data=ID (Fields)*) '}'; fragment Fields*: "fields" content+=FieldShorthand (',' content+=FieldShorthand)+; FieldShorthand infers MappedField: FieldPartOfMappedField; fragment FieldPartOfMappedField*: field=Expression; Expression: DotExpression; DotExpression infers Expression: Primary ({infer DotExpression.base=current} '.' target=DotTarget)*; Primary infers Expression: {infer Parenthesis} '(' expr=Expression ')' | RefExpression | IdRef; IdRef: {infer IdRef} "id"; RefExpression: ref=[Person:ID]; Person: 'person' name=ID; DotTarget: name=ID; Greeting: 'Hello' person=[Person:ID] '!'; hidden terminal WS: /\s+/; terminal ID: /[_a-zA-Z][\w_]*/; terminal INT returns number: /[0-9]+/; terminal STRING: /"(\\.|[^"\\])*"|'(\\.|[^'\\])*'/; hidden terminal ML_COMMENT: /\/\*[\s\S]*?\*\//; hidden terminal SL_COMMENT: /\/\/[^\n\r]*/;
and the sample model
person A person B struct x { xxx fields A, | }
the context is Struct and not MappedField.
pot.workaround
fragment Fields*: "fields" content+=FieldShorthand1 ( content+=FieldShorthand2)+; FieldShorthand1 infers MappedField: field=Expression; FieldShorthand2 infers MappedField: ',' field=Expression;
The text was updated successfully, but these errors were encountered:
No branches or pull requests
we have another case where the completion context calculation is broken
here is the grammar
and the sample model
the context is Struct and not MappedField.
pot.workaround
The text was updated successfully, but these errors were encountered: