summaryrefslogtreecommitdiffstats
path: root/source/slang/parser.cpp
diff options
context:
space:
mode:
authorTim Foley <tfoley@nvidia.com>2017-06-28 11:39:40 -0700
committerTim Foley <tfoley@nvidia.com>2017-06-28 11:51:23 -0700
commitff53669ed918c87d15ddea2d07fda84d4c8eff5d (patch)
tree0082315629ad76add2ebffe04dcd1f64943c0a9f /source/slang/parser.cpp
parentb8e31688c6826475b5199468aedea0bc44c0adc1 (diff)
Store integer literals at high precision in AST
The lexer was creating an `unsigned long long` value, and then the AST was storing it in an `int`. This change makes both use a `long long`. This is obviously still a stopgap until I can get arbitrary precisions in here.
Diffstat (limited to 'source/slang/parser.cpp')
-rw-r--r--source/slang/parser.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/slang/parser.cpp b/source/slang/parser.cpp
index 6437deca2..cd839415f 100644
--- a/source/slang/parser.cpp
+++ b/source/slang/parser.cpp
@@ -3276,7 +3276,7 @@ namespace Slang
}
constExpr->ConstType = ConstantExpressionSyntaxNode::ConstantType::Int;
- constExpr->IntValue = value;
+ constExpr->integerValue = value;
constExpr->Type = suffixType;
return constExpr;
@@ -3345,7 +3345,7 @@ namespace Slang
}
constExpr->ConstType = ConstantExpressionSyntaxNode::ConstantType::Float;
- constExpr->FloatValue = value;
+ constExpr->floatingPointValue = value;
constExpr->Type = suffixType;
return constExpr;
@@ -3391,7 +3391,7 @@ namespace Slang
constExpr->token = token;
parser->FillPosition(constExpr.Ptr());
constExpr->ConstType = ConstantExpressionSyntaxNode::ConstantType::Bool;
- constExpr->IntValue = token.Content == "true" ? 1 : 0;
+ constExpr->integerValue = token.Content == "true" ? 1 : 0;
return constExpr;
}