diff --git a/lib/DhallishGrammar.treetop b/lib/DhallishGrammar.treetop index 760adfaa59c26896c33016d460d613bb5447b91e..e7fb2c3ca40c8a18e8aaeb51eb17b914a285cb73 100644 --- a/lib/DhallishGrammar.treetop +++ b/lib/DhallishGrammar.treetop @@ -427,7 +427,8 @@ grammar DhallishGrammar end rule label - ("_" / [a-zA-Z]) ("_" / "-" / "/" / [a-zA-Z0-9])* { def to_node(ctx) Dhallish::Ast::VariableNode.new text_value end } + ("_" / [a-zA-Z]) ("_" / "-" / "/" / [a-zA-Z0-9])* { def to_node(ctx) Dhallish::Ast::VariableNode.new text_value end } / + "`" lb:(([a-zA-Z0-9] / "-" / "/" / "_" / ":" / "." / "$")+) "`" { def to_node(ctx) Dhallish::Ast::VariableNode.new lb.text_value end } end rule let_expression @@ -481,7 +482,7 @@ grammar DhallishGrammar rule import_source # can be an environment variable, url or path - (![\s] .)* + (!([\s] / "\\" / "<" / ">" / "?" / "," / "[" / "]" / "{" / "}" / "#" / "(" / ")") .)* end end