From 1abbf31f568d57ad1f8ad7c8c8449de775b3ed19 Mon Sep 17 00:00:00 2001 From: "Tristan B. Kildaire" Date: Sun, 28 Mar 2021 12:11:13 +0200 Subject: [PATCH] WIP: Support for `x.x.x` ideas --- source/tlang/compiler/lexer.d | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source/tlang/compiler/lexer.d b/source/tlang/compiler/lexer.d index 2ce173a..a1a3dd1 100644 --- a/source/tlang/compiler/lexer.d +++ b/source/tlang/compiler/lexer.d @@ -89,6 +89,15 @@ public final class Lexer /* The splitter token to finally insert */ string splitterToken; + + /** + * TODO: Add a check here for checking if the previous character + * was `!isSplitter(sourceCode[position-1])` and if current character + * `c == '.'`, if so then here we check if `sourceCode[position+1]` + * is `!isSplitter` and then we simply add `.` to current token + * build up and increment position but no token flush + */ + /* Check if we need to do combinators (e.g. for ||, &&) */ /* TODO: Second operand in condition out of bounds */ if(currentChar == '|' && (position+1) != sourceCode.length && sourceCode[position+1] == '|')