Sha256: 7ac7c174165ec8ef1da2c06372cd15bf3526d61066573cd225fb38301803736a
Contents?: true
Size: 891 Bytes
Versions: 28
Compression:
Stored size: 891 Bytes
Contents
grammar EbnfJavascript include Basic rule primitive js_all_caps_constant / js_namespace / js_constant / js_variable / js_object end rule js_object '{' [^}]* '}' end rule js_constant [A-Z] [a-zA-Z_0-9$]* { def value text_value end } end rule js_all_caps_constant [A-Z] [A-Z_]+ { def value text_value end } end rule js_variable [_a-zA-Z] [_a-zA-Z0-9]* { def value text_value end } end rule js_namespace (js_constant / js_all_caps_constant / js_variable) ('.' (js_constant / js_all_caps_constant / js_variable))* { def namespace to_a.slice(0..-2).join(".") end def name to_a.pop end def to_a text_value.split('.') end def full_name text_value end } end end
Version data entries
28 entries across 28 versions & 2 rubygems