Skip to content

Commit 0c3ed7e

Browse files
committed
Pipeline - Fix scanner.
Still needs error reporting when using # outside pipelines.
1 parent fc4452e commit 0c3ed7e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/compiler/scanner.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2043,12 +2043,13 @@ namespace ts {
20432043
tokenValue += scanIdentifierParts();
20442044
}
20452045
return token = SyntaxKind.PrivateIdentifier;
2046-
}
2047-
tokenValue = "#";
2048-
if (/*isPipelineHack*/ true) {
2046+
} else {
2047+
tokenValue = "#";
2048+
if (/*isInsidePipelineHack*/ false) {
2049+
error(Diagnostics.Invalid_character /* Hack placeholder token outside pipeline. */);
2050+
}
20492051
return token = SyntaxKind.Identifier;
20502052
}
2051-
error(Diagnostics.Invalid_character);
20522053
default:
20532054
const identifierKind = scanIdentifier(ch, languageVersion);
20542055
if (identifierKind) {

0 commit comments

Comments
 (0)