summaryrefslogtreecommitdiff
path: root/src/Lexer/Lexer.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Lexer/Lexer.php')
-rw-r--r--src/Lexer/Lexer.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/Lexer/Lexer.php b/src/Lexer/Lexer.php
index bb2a809..98ac5e2 100644
--- a/src/Lexer/Lexer.php
+++ b/src/Lexer/Lexer.php
@@ -27,7 +27,7 @@ class Lexer
"(", ")",
"[", "]",
"{", "}",
- "$", ".",
+ ".",
];
$lastPosition = -1;
@@ -238,6 +238,18 @@ class Lexer
}
}
+ // pipe placeholder
+ else if ($currentChar == "$") {
+ $output[] = new Token(
+ TokenType::PipePlaceholder,
+ $currentChar,
+ $currentChar,
+ $this->line,
+ $startColumn,
+ );
+ $this->advance(1);
+ }
+
// single char tokens
else if (in_array($currentChar, $singleCharTokens)) {
$output[] = new Token(
@@ -489,5 +501,6 @@ enum TokenType {
case Operator;
case Assign;
case Pipe;
+ case PipePlaceholder;
case EndOfFile;
}