summaryrefslogtreecommitdiff
path: root/src/parsing.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/parsing.h')
-rw-r--r--src/parsing.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/parsing.h b/src/parsing.h
index a75e953b4..7da5a22b0 100644
--- a/src/parsing.h
+++ b/src/parsing.h
@@ -84,7 +84,7 @@ parseConst(cashew::IString s, Type type, MixedArena& allocator) {
ret->type = type;
if (type.isFloat()) {
if (s == _INFINITY) {
- switch (type) {
+ switch (type.getSingle()) {
case Type::f32:
ret->value = Literal(std::numeric_limits<float>::infinity());
break;
@@ -98,7 +98,7 @@ parseConst(cashew::IString s, Type type, MixedArena& allocator) {
return ret;
}
if (s == NEG_INFINITY) {
- switch (type) {
+ switch (type.getSingle()) {
case Type::f32:
ret->value = Literal(-std::numeric_limits<float>::infinity());
break;
@@ -112,7 +112,7 @@ parseConst(cashew::IString s, Type type, MixedArena& allocator) {
return ret;
}
if (s == _NAN) {
- switch (type) {
+ switch (type.getSingle()) {
case Type::f32:
ret->value = Literal(float(std::nan("")));
break;
@@ -137,7 +137,7 @@ parseConst(cashew::IString s, Type type, MixedArena& allocator) {
if (!(modifier ? positive[4] == '0' && positive[5] == 'x' : 1)) {
throw ParseException("bad nan input");
}
- switch (type) {
+ switch (type.getSingle()) {
case Type::f32: {
uint32_t pattern;
if (modifier) {
@@ -187,7 +187,7 @@ parseConst(cashew::IString s, Type type, MixedArena& allocator) {
return ret;
}
if (s == NEG_NAN) {
- switch (type) {
+ switch (type.getSingle()) {
case Type::f32:
ret->value = Literal(float(-std::nan("")));
break;
@@ -201,7 +201,7 @@ parseConst(cashew::IString s, Type type, MixedArena& allocator) {
return ret;
}
}
- switch (type) {
+ switch (type.getSingle()) {
case Type::i32: {
if ((str[0] == '0' && str[1] == 'x') ||
(str[0] == '-' && str[1] == '0' && str[2] == 'x')) {