Permalink
Browse files

Add Literal to Core::Nodes

  • Loading branch information...
1 parent a64ac6a commit 2bbffc09f3ad32092cf5312b22ee6a4bdff5cfae @bacek committed Dec 8, 2008
Showing with 9 additions and 1 deletion.
  1. +9 −1 XQuery/Core/Nodes.pm
View
@@ -11,7 +11,7 @@ class XQuery::Core::Node {
method left { };
method dump ( $level = 0) {
- say self;
+ say ' ' x $level, self;
if (self.right) {
self.right.dump(1+$level);
}
@@ -167,6 +167,14 @@ enum XQuery::Core::Axis<
#| ("*" ":" NCName)
#[55] PrimaryExpr ::= Literal | VarRef | ParenthesizedExpr | FunctionCall | OrderedExpr | UnorderedExpr | Constructor
#[56] Literal ::= NumericLiteral | StringLiteral
+class XQuery::Core::Literal is XQuery::Core::Node {
+ has $.value;
+
+ method Str {
+ 'Literal[' ~ $.value ~ ']';
+ }
+};
+
#[57] NumericLiteral ::= IntegerLiteral | DecimalLiteral | DoubleLiteral
#[58] VarRef ::= "$" VarName
#[59] VarName ::= QName

0 comments on commit 2bbffc0

Please sign in to comment.