Skip to content

Commit

Permalink
Found a few more
Browse files Browse the repository at this point in the history
  • Loading branch information
jg-rp committed Dec 25, 2024
1 parent 960538a commit ebb8e52
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
4 changes: 3 additions & 1 deletion liquid/builtin/tags/decrement_tag.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ def parse(self, stream: TokenStream) -> DecrementNode:
tok=tok,
identifier=str(
parse_unchained_identifier(
ExprTokenStream(tokenize(stream.current.value))
ExprTokenStream(
tokenize(stream.current.value, stream.current.linenum)
)
)
),
)
4 changes: 3 additions & 1 deletion liquid/builtin/tags/increment_tag.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ def parse(self, stream: TokenStream) -> IncrementNode:
tok=tok,
identifier=str(
parse_unchained_identifier(
ExprTokenStream(tokenize(stream.current.value))
ExprTokenStream(
tokenize(stream.current.value, stream.current.linenum)
)
)
),
)
5 changes: 4 additions & 1 deletion liquid/builtin/tags/render_tag.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Parse tree node and tag definition for the built in "render" tag."""

import sys
from typing import Dict
from typing import List
Expand Down Expand Up @@ -249,7 +250,9 @@ class RenderTag(Tag):
def parse(self, stream: TokenStream) -> Node:
tok = next(stream)
expect(stream, TOKEN_EXPRESSION)
expr_stream = ExprTokenStream(tokenize(stream.current.value))
expr_stream = ExprTokenStream(
tokenize(stream.current.value, stream.current.linenum)
)

# Need a string. 'render' does not accept identifiers that resolve to a string.
# This is the name of the template to be included.
Expand Down
4 changes: 3 additions & 1 deletion liquid/extra/tags/if_not.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@ class IfNotTag(IfTag):
def parse_expression(self, stream: TokenStream) -> Expression:
"""Pare a boolean expression from a stream of tokens."""
expect(stream, TOKEN_EXPRESSION)
return parse_boolean_expression_with_parens(stream.current.value)
return parse_boolean_expression_with_parens(
stream.current.value, stream.current.linenum
)

0 comments on commit ebb8e52

Please sign in to comment.