Printable idea sheet
empty_attribute
reqlan rq/language/syntax.rq:291
Katz 0.040
A line that contains only @ is insignificant whitespace.
Spaces or tabs may precede that @.
Spaces or tabs may follow that @.
The lexer consumes that @ as hidden whitespace.
The parser does not build an attribute for that line.
That line does not cause a parser error.
That line does not cause a lexer error.
That line does not cause a tokenizer error.
That line does not cause an extension error.
A flag keeps the form @ name.
A negated flag keeps the form @ name!.
A valued attribute keeps its value after the name.
A syntax error on a different line is still reported.
- implementation
- reqlan-token-builder.ts, reqlan.langium, lexer.rs
- tests
- parsing.test.ts:parses a lone @ without a parser error and keeps later ideas, parsing.test.ts:still reports a syntax error when another line is invalid, validating.test.ts:does not report an extension error for a lone @, lexer.rs:lone_at_is_hidden_whitespace, parser.rs:lone_at_keeps_surrounding_ideas, parser.rs:syntax_error_elsewhere_is_still_reported
Interactive page: empty_attribute