Skip to content
New issue

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

add event keyword #74

Merged
merged 1 commit into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
814 changes: 411 additions & 403 deletions src/main/gen/io/github/facilityapi/intellij/lexer/_FsdLexer.java

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions src/main/gen/io/github/facilityapi/intellij/psi/FsdEventSpec.java

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions src/main/gen/io/github/facilityapi/intellij/psi/FsdTypes.java

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class FsdSyntaxHighlighter : SyntaxHighlighterBase() {
FsdTypes.SERVICE,
FsdTypes.DATA,
FsdTypes.METHOD,
FsdTypes.EVENT,
FsdTypes.ENUM,
FsdTypes.ERRORS,
FsdTypes.EXTERN,
Expand Down
3 changes: 2 additions & 1 deletion src/main/kotlin/io/github/facilityapi/intellij/fsd.bnf
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,15 @@ definition ::= (attribute_list* service_spec) markdown_remarks*
service_spec ::= service identifier service_items { pin=1 }
service_items ::= ('{' decorated_service_item* '}') | decorated_service_item
decorated_service_item ::= attribute_list* service_item
private service_item ::= (extern_decl | enum_spec | data_spec | method_spec | error_set_spec) { recoverWhile=service_item_recover }
private service_item ::= (extern_decl | enum_spec | data_spec | method_spec | event_spec | error_set_spec) { recoverWhile=service_item_recover }
private service_item_recover ::= !('[' | '}' | extern | enum | data | errors | method)

private field_list ::= '{' (comment+ | decorated_field)* '}' { pin=1 }

request_fields ::= field_list
response_fields ::= field_list
method_spec ::= method identifier_declaration request_fields ':' response_fields { pin=1 }
event_spec ::= event identifier_declaration request_fields ':' response_fields { pin=1 }

data_spec ::= data identifier_declaration field_list { pin=1 }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ MARKDOWN_TEXT=.+

"extern" { yybegin(EXTERN_DECL); return EXTERN; }
"method" { yybegin(METHOD_BODY); return METHOD; }
"event" { yybegin(METHOD_BODY); return EVENT; }
"data" { yybegin(DATA_BODY); return DATA; }
"errors" { yybegin(LIST_BODY); return ERRORS; }
"enum" { yybegin(LIST_BODY); return ENUM; }
Expand Down
Loading