Skip to content

Commit

Permalink
add event keyword
Browse files Browse the repository at this point in the history
  • Loading branch information
bryankenote committed Jan 15, 2025
1 parent d6383ac commit 862f684
Show file tree
Hide file tree
Showing 11 changed files with 519 additions and 405 deletions.
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

0 comments on commit 862f684

Please sign in to comment.