Skip to content

Add support for hex, octal, and binary integer literals#1171

Merged
davidism merged 1 commit intopallets:masterfrom
amykyta3:feature/base-integer-literals
Apr 5, 2021
Merged

Add support for hex, octal, and binary integer literals#1171
davidism merged 1 commit intopallets:masterfrom
amykyta3:feature/base-integer-literals

Conversation

@amykyta3
Copy link
Copy Markdown
Contributor

@amykyta3 amykyta3 commented Mar 11, 2020

Resolves #1170

Since Jinja expression syntax closely mimics Python, it is surprising that not all of Python's integer literal representations are supported:
https://docs.python.org/3/reference/lexical_analysis.html#integer-literals

This pull request extends the lexer to be able to understand all of the integer literal formats that Python supports.
Unit-tests have been extended as appropriate.

@davidism davidism added this to the 3.0.0 milestone Mar 27, 2021
@davidism davidism merged commit fd001b2 into pallets:master Apr 5, 2021
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Apr 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for hexadecimal integer literals in templates

2 participants