Skip to content

Commit

Permalink
Merge pull request #742 from lindsay-stevens/iana-subtags
Browse files Browse the repository at this point in the history
740: Improve complex forms performance - follow up - IANA test/update, move comment
  • Loading branch information
lognaturel authored Dec 9, 2024
2 parents 6a40508 + 2c878a3 commit 95034d9
Show file tree
Hide file tree
Showing 6 changed files with 184 additions and 22 deletions.
2 changes: 1 addition & 1 deletion pyxform/parsing/expression.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ def tokenizer(scan, value) -> ExpLexerToken | str:
return re.Scanner(lexicon)


# Scanner takes a few 100ms to compile so use this shared instance.
class ExpLexerToken:
__slots__ = ("name", "value", "start", "end")

Expand All @@ -85,6 +84,7 @@ def __init__(self, name: str, value: str, start: int, end: int) -> None:
self.end: int = end


# Scanner takes a few 100ms to compile so use these shared instances.
_EXPRESSION_LEXER = get_expression_lexer()
_TOKEN_NAME_LEXER = get_expression_lexer(name_only=True)

Expand Down
Loading

0 comments on commit 95034d9

Please sign in to comment.