Skip to content

Commit

Permalink
[fix] synatx,js-like: fix the keyword list
Browse files Browse the repository at this point in the history
  • Loading branch information
OpaOnWindowsNow committed Dec 20, 2011
1 parent 09f7564 commit 3d409d6
Showing 1 changed file with 14 additions and 20 deletions.
34 changes: 14 additions & 20 deletions opalang/js_syntax/opa_lexer.trx
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -232,15 +232,19 @@ not_a_keyword <- !(keyword end_of_ident_nosp)
time is multiply *) time is multiply *)
keyword <- ( keyword <- (
Opa_parser.declaration_directive0_keyword $_ Opa_parser.declaration_directive0_keyword $_
/ "recursive" / "and"
/ "function" / "module" / "function" / "module"
/ "match" / "if" / "as" / "case" / "default" / "with" / "type"

/ "recursive" / "and"

/ "match" / "if" / "as" / "case" / "default" / "else"

/ "database" / "database"
/ "type" / "parser"
/ "with"
/ "css"
/ "server" / "client" / "exposed" / "protected"
/ "_" / "_"
/ "css"

/ "server" / "client" / "exposed" / "protected" (* see directive without @ *)
) )


(* Keywords : Bindings *) (* Keywords : Bindings *)
Expand All @@ -259,23 +263,13 @@ IF <- (=Opa_lexer.exact_keyword("if"))
AS <- (=Opa_lexer.exact_keyword("as")) AS <- (=Opa_lexer.exact_keyword("as"))
CASE <- (=Opa_lexer.exact_keyword("case")) CASE <- (=Opa_lexer.exact_keyword("case"))
DEFAULT <- (=Opa_lexer.exact_keyword("default")) DEFAULT <- (=Opa_lexer.exact_keyword("default"))
ELSE <- (=Opa_lexer.exact_keyword("else"))


(* Keywords : Database *) (* Keywords : Database *)
DATABASE <- (=Opa_lexer.exact_keyword("database")) DATABASE <- (=Opa_lexer.exact_keyword("database"))

PARSER <- (=Opa_lexer.exact_keyword("parser"))

UNDERSCORE <- (=Opa_lexer.exact_keyword("_"))

CSS <- (=Opa_lexer.exact_keyword("css"))

WITH <- spacing 'with' end_of_ident_nosp $
TYPE <- spacing 'type' end_of_ident_nosp $
DO <- spacing 'do' end_of_ident_nosp $ (* TODO REMOVE *)
IF <- spacing 'if' end_of_ident_nosp $
THEN <- spacing 'then' end_of_ident_nosp $ (* TODO REMOVE *)
ELSE <- spacing 'else' end_of_ident_nosp $(* TODO REMOVE *)
PARSER <- spacing 'parser' end_of_ident_nosp $
UNDERSCORE <- spacing '_' end_of_ident_nosp $
SESSION <- spacing 'session' end_of_ident_nosp $
CSS <- spacing 'css' end_of_ident_nosp $




# #
Expand Down

0 comments on commit 3d409d6

Please sign in to comment.