Skip to content

Commit

Permalink
Add Literal to Core::Nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
bacek committed Dec 8, 2008
1 parent a64ac6a commit 2bbffc0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion XQuery/Core/Nodes.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2bbffc0

Please sign in to comment.