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 - - -# ---------------------------------------------------------------------------