Permalink
Browse files

[fix] compiler, syntax: or should be a keyword, and be used as strict…

… keyword
  • Loading branch information...
BourgerieQuentin committed Feb 9, 2012
1 parent 5baf986 commit e27dad827ae5f60ea036fe0f158cc329096863e2
Showing with 3 additions and 3 deletions.
  1. +1 −1 opalang/js_syntax/opa_lexer.trx
  2. +2 −2 opalang/js_syntax/opa_parser.trx
@@ -174,7 +174,6 @@ quote <- spacing quote_nosp $
ampersand <- spacing ampersand_nosp $
underscore<- spacing underscore_nosp $
alias <- spacing alias_nosp $
-or <- spacing or_nosp $
dots <- spacing dots_nosp $
assign <- spacing assign_nosp $
@@ -248,6 +247,7 @@ keyword <- (
)
(* Keywords : Bindings *)
+OR <- (=Opa_lexer.exact_keyword("or"))
FUNCTION <- (=Opa_lexer.exact_keyword("function"))
MODULE <- (=Opa_lexer.exact_keyword("module"))
WITH <- (=Opa_lexer.exact_keyword("with"))
@@ -380,7 +380,7 @@ type_without_arrow = deco(just_type_without_arrow)
just_type_without_arrow <- type_sum
/ just_type_without_sum
-type_sum <- Opa_lexer.or? (=list1(type_sum_element,Opa_lexer.or)):l end_of_type_sum:o
+type_sum <- Opa_lexer.OR? (=list1(type_sum_element,Opa_lexer.OR)):l end_of_type_sum:o
{{ match l,o with
| [h], None ->
( match undecorate h with
@@ -394,7 +394,7 @@ type_sum <- Opa_lexer.or? (=list1(type_sum_element,Opa_lexer.or)):l end_of_type_
type_sum_element = deco just_type_sum_element;
just_type_sum_element <- just_type_record:r {{ SumRecord r }}
/ just_type_instance:t {{ SumName t }}
-end_of_type_sum <- Opa_lexer.or? end_of_type_sum_var?:f {{ f }}
+end_of_type_sum <- Opa_lexer.OR? end_of_type_sum_var?:f {{ f }}
end_of_type_sum_var <- typevar:f {{ unc2 colvar f }}
/ implicit_col_variable:f {{ unc2 colvar f }}
implicit_col_variable = deco just_implicit_col_variable;

0 comments on commit e27dad8

Please sign in to comment.