Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[fix] syntax,js-like: no keyword restriction on db path

  • Loading branch information...
commit a0768528829639df563e42541eee85d486947dd8 1 parent e00455e
@OpaOnWindowsNow OpaOnWindowsNow authored
Showing with 10 additions and 10 deletions.
  1. +10 −10 opalang/js_syntax/parser_path.trx
View
20 opalang/js_syntax/parser_path.trx
@@ -17,9 +17,9 @@
*)
(* shorcuts to other files *)
;slash_nosp <- Opa_lexer.slash_nosp
-;deco_ml_identifier_nosp <- Opa_parser.deco_ml_identifier_nosp
-;ml_identifier_nosp <- Opa_lexer.ml_identifier_nosp
-;ml_identifier <- Opa_lexer.ml_identifier
+;deco_field_identifier_nosp <- Opa_parser.deco_field_identifier_nosp
+;field_identifier_nosp <- Opa_lexer.field_identifier_nosp
+;field_identifier <- Opa_lexer.field_identifier
;underscore_nosp <- Opa_lexer.underscore_nosp
;lbracket <- Opa_lexer.lbracket
;lbracket_nosp <- Opa_lexer.lbracket_nosp
@@ -33,16 +33,16 @@
;semic <- Opa_lexer.semic
(* path definition, ie for [db pathdef : typ] or [db pathdef = expr] *)
-;pathdef_nosp <-slash_nosp ml_identifier_nosp:i
- (slash_nosp ml_identifier_nosp:i {{QmlAst.Db.Decl_fld i}}
+;pathdef_nosp <-slash_nosp field_identifier_nosp:i
+ (slash_nosp field_identifier_nosp:i {{QmlAst.Db.Decl_fld i}}
/ "[]" {{ QmlAst.Db.Decl_set [] }}
/ "[_]" {{ QmlAst.Db.Decl_set [] }})*:l
{{ (QmlAst.Db.Decl_fld i)::l }}
;/** todo: extend to multiple index **/
-setindex_def <- lbrace (=list1(ml_identifier,semic)):i rbrace
+setindex_def <- lbrace (=list1(field_identifier,semic)):i rbrace
{{ QmlAst.Db.Decl_set [List.sort String.compare i] }}
-;pathdef_type_nosp <- slash_nosp ml_identifier_nosp:i
- (slash_nosp ml_identifier_nosp:i {{QmlAst.Db.Decl_fld i}}
+;pathdef_type_nosp <- slash_nosp field_identifier_nosp:i
+ (slash_nosp field_identifier_nosp:i {{QmlAst.Db.Decl_fld i}}
/ lbracket setindex_def:i rbracket {{i}})*:l
{{ (QmlAst.Db.Decl_fld i)::l }}
;/** database path definition without type **/
@@ -65,10 +65,10 @@ path_write <- slash_nosp path:p {{ p }}
/ slash_nosp {{ QmlAst.Db.Default }}
;path = Opa_parser.careful_deco just_path
-;just_path <- deco_ml_identifier_nosp:i path_elem*:l {{ let (s,label) = i in ((FldKey s),label) :: l }}
+;just_path <- deco_field_identifier_nosp:i path_elem*:l {{ let (s,label) = i in ((FldKey s),label) :: l }}
;path_elem = Opa_parser.careful_deco just_path_elem
-;just_path_elem <- slash_nosp ml_identifier_nosp:i {{ FldKey i }}
+;just_path_elem <- slash_nosp field_identifier_nosp:i {{ FldKey i }}
/ lbracket_nosp Opa_parser.expr:e rbracket {{ ExprKey e }}
/ lbracket_nosp spacing [?] rbracket {{ NewKey }}

0 comments on commit a076852

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