aboutsummaryrefslogtreecommitdiffstats
path: root/Parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Parser.cpp')
-rw-r--r--Parser.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/Parser.cpp b/Parser.cpp
index 3c88efc7..44d11159 100644
--- a/Parser.cpp
+++ b/Parser.cpp
@@ -822,6 +822,15 @@ ASTPointer<Expression> Parser::parsePrimaryExpression()
expression = nodeFactory.createNode<Literal>(token, literal, subdenomination);
break;
}
+ if (Token::isTimeSubdenomination(m_scanner->peekNextToken()))
+ {
+ ASTPointer<ASTString> literal = getLiteralAndAdvance();
+ nodeFactory.markEndPosition();
+ Literal::SubDenomination subdenomination = static_cast<Literal::SubDenomination>(m_scanner->getCurrentToken());
+ m_scanner->next();
+ expression = nodeFactory.createNode<Literal>(token, literal, subdenomination);
+ break;
+ }
// fall-through
case Token::StringLiteral:
nodeFactory.markEndPosition();