Skip to content

Commit 6ed852f

Browse files
0-v-0WebFreak001
authored andcommitted
Remove bookmark/checkpoint
1 parent 506f33e commit 6ed852f

2 files changed

Lines changed: 9 additions & 13 deletions

File tree

src/dparse/ast.d

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2932,6 +2932,14 @@ final class PrimaryExpression : ExpressionNode
29322932
/** */ Arguments arguments;
29332933
/** */ InterpolatedString interpolatedString;
29342934
mixin OpEquals;
2935+
2936+
IdType builtinType() inout @property @safe nothrow @nogc pure
2937+
{
2938+
if (type)
2939+
if (auto t2 = type.type2)
2940+
return t2.builtinType ? t2.builtinType : IdType.init;
2941+
return IdType.init;
2942+
}
29352943
}
29362944

29372945
///

src/dparse/parser.d

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5924,19 +5924,7 @@ class Parser
59245924
}
59255925
foreach (B; BasicTypes) { case B: }
59265926
{
5927-
auto bookmark = setBookmark();
5928-
auto c = allocator.setCheckpoint();
5929-
if (auto t = parseType())
5930-
{
5931-
abandonBookmark(bookmark);
5932-
node.type = t;
5933-
}
5934-
else
5935-
{
5936-
allocator.rollback(c);
5937-
goToBookmark(bookmark);
5938-
node.basicType = advance();
5939-
}
5927+
node.type = parseType();
59405928
if (currentIs(tok!"."))
59415929
{
59425930
advance();

0 commit comments

Comments
 (0)