Skip to content
This repository
Browse code

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

… keyword
  • Loading branch information...
commit e27dad827ae5f60ea036fe0f158cc329096863e2 1 parent 5baf986
Quentin Bourgerie BourgerieQuentin authored
2  opalang/js_syntax/opa_lexer.trx
@@ -174,7 +174,6 @@ quote <- spacing quote_nosp $
174 174 ampersand <- spacing ampersand_nosp $
175 175 underscore<- spacing underscore_nosp $
176 176 alias <- spacing alias_nosp $
177   -or <- spacing or_nosp $
178 177 dots <- spacing dots_nosp $
179 178 assign <- spacing assign_nosp $
180 179
@@ -248,6 +247,7 @@ keyword <- (
248 247 )
249 248
250 249 (* Keywords : Bindings *)
  250 +OR <- (=Opa_lexer.exact_keyword("or"))
251 251 FUNCTION <- (=Opa_lexer.exact_keyword("function"))
252 252 MODULE <- (=Opa_lexer.exact_keyword("module"))
253 253 WITH <- (=Opa_lexer.exact_keyword("with"))
4 opalang/js_syntax/opa_parser.trx
@@ -380,7 +380,7 @@ type_without_arrow = deco(just_type_without_arrow)
380 380 just_type_without_arrow <- type_sum
381 381 / just_type_without_sum
382 382
383   -type_sum <- Opa_lexer.or? (=list1(type_sum_element,Opa_lexer.or)):l end_of_type_sum:o
  383 +type_sum <- Opa_lexer.OR? (=list1(type_sum_element,Opa_lexer.OR)):l end_of_type_sum:o
384 384 {{ match l,o with
385 385 | [h], None ->
386 386 ( match undecorate h with
@@ -394,7 +394,7 @@ type_sum <- Opa_lexer.or? (=list1(type_sum_element,Opa_lexer.or)):l end_of_type_
394 394 type_sum_element = deco just_type_sum_element;
395 395 just_type_sum_element <- just_type_record:r {{ SumRecord r }}
396 396 / just_type_instance:t {{ SumName t }}
397   -end_of_type_sum <- Opa_lexer.or? end_of_type_sum_var?:f {{ f }}
  397 +end_of_type_sum <- Opa_lexer.OR? end_of_type_sum_var?:f {{ f }}
398 398 end_of_type_sum_var <- typevar:f {{ unc2 colvar f }}
399 399 / implicit_col_variable:f {{ unc2 colvar f }}
400 400 implicit_col_variable = deco just_implicit_col_variable;

0 comments on commit e27dad8

Please sign in to comment.
Something went wrong with that request. Please try again.