From bece40c76c356ef004f72621133334a833bbe604 Mon Sep 17 00:00:00 2001 From: Vignesh Skanda Date: Fri, 4 Oct 2024 19:43:43 +0530 Subject: [PATCH] Update lexer.py --- src/cql/lexer.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/cql/lexer.py b/src/cql/lexer.py index e714047..2d8ca4c 100644 --- a/src/cql/lexer.py +++ b/src/cql/lexer.py @@ -73,14 +73,9 @@ def t_CHAR_STRING2(self, tok: LexToken) -> LexToken: # --------------------------------------------------- - #: A string containing ignored characters (spaces and tabs) + #: A string containing ignored characters (spaces, tabs, and newlines) t_ignore = " \t\r\n\f\v" - def t_ignore_newline(self, tok: LexToken) -> None: - r"\n+" - # NOTE: not sure if required - tok.lexer.lineno += tok.value.count("\n") - #: Error handling rule def t_error(self, tok: LexToken) -> None: LOGGER.error("Illegal character '%s' at %s", tok.value[0], tok.lexpos) @@ -114,6 +109,3 @@ def run(self, content: str, skip: int = 0, limit: int = 30): break yield tok - - -# ---------------------------------------------------------------------------