Skip to content

Commit

Permalink
[textual] fixing lexer bug on .handlers_
Browse files Browse the repository at this point in the history
Summary:
we add a space in the special chain ".handlers" to make sure it can
not be confuse with the sequence ["."; "handlersxxxxxx"]

Reviewed By: vsiles

Differential Revision:
D50400756

Privacy Context Container: L1208441

fbshipit-source-id: c51a2faa2906596aa0bda5208f8da0a705fa6632
  • Loading branch information
davidpichardie authored and facebook-github-bot committed Oct 18, 2023
1 parent 390a6a2 commit 63aad68
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion infer/src/textual/TextualLexer.ml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ let build_mainlex keywords =
STAR
| "?" ->
QUESTION
| ".handlers" ->
| ".handlers " ->
HANDLERS
| floating_point_literal -> (
let f = Lexbuf.lexeme lexbuf in
Expand Down
1 change: 0 additions & 1 deletion infer/tests/codetoanalyze/sil/verif/issues.exp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ error_lit_local.sil, line 10, column 2: SIL syntax error: unexpected token n00b
syntax_error_closure1.sil, line 15, column 13: SIL syntax error: call inside closure should end with y,z
syntax_error_closure2.sil, line 15, column 13: SIL syntax error: call inside closure should end with y,z
syntax_error_closure3.sil, line 15, column 13: SIL syntax error: call inside closure should end with y,z
syntax_error_keywords.sil, line 13, column 31: SIL syntax error: unexpected token .handlers
syntax_error_node_call.sil, line 10, column 15: SIL syntax error: foo.lab
syntax_error_procname1.sil, line 8, column 8: SIL syntax error: ?.bar
syntax_error_procname2.sil, line 8, column 7: SIL syntax error: ?.bar
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

type T = { handlers_: *HackMixed }

define FP_parsing_ok($this: *T) : void {
define parsing_ok($this: *T) : void {
#entry:
n0 : *T = load &$this
n1 : *HackMixed = load n0.T.handlers_
Expand Down

0 comments on commit 63aad68

Please sign in to comment.