aboutsummaryrefslogtreecommitdiffstats
path: root/Grammar.pp
diff options
context:
space:
mode:
authorIvan Enderlin <ivan.enderlin@hoa-project.net>2014-05-21 08:50:55 +0200
committerIvan Enderlin <ivan.enderlin@hoa-project.net>2014-05-21 08:53:31 +0200
commit3f019dd711477be78bcdc6718d1aab890ca9bb12 (patch)
treef4615a4c901ebe2769bea8f95a46d05d9102d06f /Grammar.pp
parentb5fcc37c476df179f020ea6686f7ecfe4d3dc739 (diff)
downloadPraspel-3f019dd711477be78bcdc6718d1aab890ca9bb12.zip
Praspel-3f019dd711477be78bcdc6718d1aab890ca9bb12.tar.gz
Praspel-3f019dd711477be78bcdc6718d1aab890ca9bb12.tar.bz2
Add syntactic sugar for class().
\C <=> class('C').
Diffstat (limited to 'Grammar.pp')
-rw-r--r--Grammar.pp7
1 files changed, 5 insertions, 2 deletions
diff --git a/Grammar.pp b/Grammar.pp
index c745a5f..0f6f8fe 100644
--- a/Grammar.pp
+++ b/Grammar.pp
@@ -235,7 +235,7 @@ constant:
scalar() | array()
scalar:
- <null> | boolean() | number() | string() | regex() | range()
+ <null> | boolean() | number() | string() | regex() | class() | range()
boolean:
<true> | <false>
@@ -255,6 +255,9 @@ quoted_string:
#regex:
<regex>
+#class:
+ classname()
+
#range:
number() ::range:: number()
| number() ::range:: #left_range
@@ -292,7 +295,7 @@ identifier:
| <result>
#classname:
- ::backslash::? <identifier> ( ::backslash:: <identifier> )*
+ ::backslash:: <identifier> ( ::backslash:: <identifier> )*
herestring:
::heredoc_::