summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-parser.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2022-08-12 07:57:41 -0700
committerGitHub <noreply@github.com>2022-08-12 07:57:41 -0700
commit786f48d32340c36a06865a333ff9066033b5b2bc (patch)
treea3f5823e66b59517c6cd4a7d5ddd1774bf10ccb3 /source/slang/slang-parser.cpp
parentb5d84f60d36b81c7e8263048dda031a9be14a106 (diff)
Fix logic of `is` operator. (#2359)
Diffstat (limited to 'source/slang/slang-parser.cpp')
-rw-r--r--source/slang/slang-parser.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/slang/slang-parser.cpp b/source/slang/slang-parser.cpp
index 7447859c7..33f2e251b 100644
--- a/source/slang/slang-parser.cpp
+++ b/source/slang/slang-parser.cpp
@@ -4858,6 +4858,7 @@ namespace Slang
isExpr->value = expr;
parser->ReadToken();
isExpr->typeExpr = parser->ParseTypeExp();
+ isExpr->loc = opToken.loc;
expr = isExpr;
continue;
}
@@ -4867,6 +4868,7 @@ namespace Slang
asExpr->value = expr;
parser->ReadToken();
asExpr->typeExpr = parser->ParseType();
+ asExpr->loc = opToken.loc;
expr = asExpr;
continue;
}