Dylan Thacker-Smith
1d63d5db5f
Fix a leaky test that set Tempate.error_mode without resetting it ( #1339 )
2020-10-28 10:36:33 -04:00
Dylan Thacker-Smith
f23c2a83f2
Fix lax parsing expressions surrounded by spaces ( #1335 )
...
to make it compatible with strict parsing and liquid-c
2020-10-27 14:53:57 -04:00
Peter Zhu
61d54d1b19
Merge pull request #1331 from Shopify/pz-freeze-block
...
Freeze block body after parsing completes
2020-10-27 13:17:54 -04:00
Dylan Thacker-Smith
10ea6144e0
Add Liquid::ParseContext#parse_expression for liquid-c node disabling ( #1333 )
...
We would like to be able to disable liquid-c VM rendering at runtime,
but right now expression parsing is done using Expression.parse, which
isn't aware of the parse context. That prevents us from conditionally
compiling to VM code based on a parse option.
2020-10-27 11:00:04 -04:00
Peter Zhu
292d971937
Merge loops
2020-10-27 10:42:30 -04:00
Peter Zhu
5c082472a1
Address comments
2020-10-26 16:16:30 -04:00
Peter Zhu
0bedc71854
Address comments
2020-10-26 15:11:00 -04:00
Peter Zhu
fe66edb825
Freeze block body after parsing completes
2020-10-26 11:06:55 -04:00
Ashwin Maroli
0e52706a5b
Remove redundant comment in Liquid::Template ( #1328 )
2020-10-22 12:49:02 -04:00
Dylan Thacker-Smith
4c6166f989
Add parsing quirk test for lookup on variable with literal name ( #1325 )
2020-10-21 16:30:17 -04:00
Justin Li
8e99b3bd7f
Merge pull request #1322 from ashmaroli/else-tag-names
...
Stash array of tag names in a constant
2020-10-21 12:09:14 -04:00
Dylan Thacker-Smith
f6532de1fd
Merge pull request #1323 from Shopify/assign-score-hash
...
Avoid allocating arrays of key value pairs in assign_score_of
2020-10-21 11:18:35 -04:00
Dylan Thacker-Smith
001fde7694
Avoid allocating arrays of key value pairs for hashes in assign_score_of
2020-10-21 10:36:00 -04:00
Dylan Thacker-Smith
b872eac2b9
More comprehensively test assign_score_of
2020-10-21 10:35:56 -04:00
Dylan Thacker-Smith
038d0585cf
Move some assign score increment tests to the tag that increments
2020-10-21 10:21:00 -04:00
Ashwin Maroli
b15428ea83
Stash array of tag names in a constant
2020-10-21 18:50:56 +05:30
Dylan Thacker-Smith
c9ad9d338c
Extract method for raising a syntax error in the assign tag for liquid-c ( #1321 )
2020-10-20 16:59:52 -04:00
Dylan Thacker-Smith
ae6bd9f6b0
Allow an empty variable tag during strict parsing for liquid-c compat ( #1320 )
2020-10-20 14:11:48 -04:00
Dylan Thacker-Smith
866e437c05
Test tag disabling using custom tags ( #1318 )
...
Since I don't think we have any use case to disable the `raw` or
`echo` tags, so I would like liquid-c to not have to support that
2020-10-19 16:32:02 -04:00
Dylan Thacker-Smith
784db053f2
Merge pull request #1317 from Shopify/strict-parse-dynamic-find-var
...
Fix strict parsing of find variable with a name expression
2020-10-19 13:43:26 -04:00
Dylan Thacker-Smith
ff1c6bd26e
Actually remove test file with no extension moved into another test file ( #1316 )
2020-10-19 12:40:02 -04:00
Dylan Thacker-Smith
46fd63da5f
Fix strict parsing of find variable with a name expression
2020-10-19 12:17:25 -04:00
Dylan Thacker-Smith
420a1c79e1
Refactor variable lookup strict parsing to reduce coupling on dot lookup
2020-10-19 12:10:32 -04:00
Dylan Thacker-Smith
6d39050e1e
Use a case statement in Liquid::Parser#expression
2020-10-19 12:10:11 -04:00
Dylan Thacker-Smith
077bf2a409
Test reporting of liquid error for filter call with wrong number of arguments ( #1311 )
2020-10-08 11:55:40 -04:00
Dylan Thacker-Smith
1a3e38c018
Merge pull request #1310 from Shopify/only-integration-test-liquid-c
...
Fix liquid-c integration testing
2020-10-08 11:52:50 -04:00
Dylan Thacker-Smith
e495f75cc2
Remove support for ruby 2.4, which is no longer supported upstream
2020-10-08 09:48:16 -04:00
Dylan Thacker-Smith
e781449c36
Remove root directory from library search path for tests
...
It isn't in the gemspec's require_path, so we shouldn't add any dependence
on it.
2020-10-08 01:53:11 -04:00
Dylan Thacker-Smith
7eb03ea198
Only test liquid-c integration using the integration tests
2020-10-08 01:52:40 -04:00
Peter Zhu
bd34cd5613
Merge pull request #1308 from Shopify/pz-gh-actions
...
Use GitHub Actions for CI
2020-10-07 14:38:15 -04:00
Peter Zhu
c28d455f7b
Use GitHub Actions for CI
2020-10-07 13:29:39 -04:00
Dylan Thacker-Smith
d250a7f502
Set Context#initialize instance variables before squashing assigns ( #1307 )
2020-10-06 21:00:08 -04:00
Peter Zhu
b0f46326ca
Merge pull request #1306 from Shopify/pz-raise-tag-never-closed
...
Refactor raising tag never closed error to method
2020-10-06 17:13:35 -04:00
Peter Zhu
7aed2f122c
Refactor raising tag never closed to method
2020-10-06 15:55:55 -04:00
Peter Zhu
5199a34d9b
Merge pull request #1304 from Shopify/pz-raw-bug
...
Fix duplication of text in raw tags
2020-10-05 10:59:15 -04:00
Peter Zhu
4c2ab6f878
Fix bug in raw tags
2020-10-05 10:47:28 -04:00
Dylan Thacker-Smith
a818dd9d19
Fix test with missing extension ( #1302 )
2020-09-30 13:44:28 -04:00
Dylan Thacker-Smith
efef03d944
Merge pull request #1294 from Shopify/changes-for-liquid-c-vm-variable
...
Refactor to support liquid-c VM compilation of variables
2020-09-29 21:02:26 -04:00
Dylan Thacker-Smith
33760f083a
Extract rescue code from BlockBody#render_node for re-use in liquid-c
2020-09-25 11:24:39 -04:00
Dylan Thacker-Smith
013802c877
Move some unit tests without internal coupling to integration tests
...
since I would like to continue supporting these tests in liquid-c
in the foreseeable future.
2020-09-25 11:24:39 -04:00
Dylan Thacker-Smith
3dcad3b3cd
Move test/integration/parse_tree_visitor_test.rb to test/unit
...
The ParseTreeVisitor exposes the liquid internals that won't be
kept compatible with liquid-c, so move it out of the integration
tests directory so that we can easily ignore it when testing liquid-c
2020-09-25 11:24:39 -04:00
Dylan Thacker-Smith
db065315ba
Allow creating symbols that are garbage collected in a test
2020-09-25 11:24:39 -04:00
Dylan Thacker-Smith
a03f02789b
Only use MethodLiteral in condition expressions ( #1300 )
2020-09-25 11:10:33 -04:00
Dylan Thacker-Smith
ca4b9b43af
Port liquid-c bug compatible whitespace trimming ( #1291 )
2020-09-16 16:07:36 -04:00
Dylan Thacker-Smith
77084930e9
Bring back silencing of errors in blank nodes for backwards compatibility ( #1292 )
2020-09-15 10:35:18 -04:00
Dylan Thacker-Smith
fb77921b15
Merge pull request #1290 from Shopify/document-unknown-tag-refactor
...
Pass the tag markup and tokenizer to Document#unknown_tag
2020-09-11 09:34:16 -04:00
Dylan Thacker-Smith
0d02dea20b
Rename Liquid::Block#unknown_tag parameters for clarity
2020-09-11 09:33:12 -04:00
Dylan Thacker-Smith
86b47ba28b
Pass the tag markup and tokenizer to Document#unknown_tag
...
The parse_context no longer needs to be passed in because it is available
through through an attr_reader on the instance. However, the markup and
tokenizer weren't made available. This refactor also makes the parameters
given to Document#unknown_tag consistent with Block#unknown_tag.
2020-09-11 09:33:12 -04:00
Dylan Thacker-Smith
95ff0595c6
Merge pull request #1289 from Shopify/refactor-for-c-block-body
...
Avoid direct coupling to BlockBody instances for liquid-c replacement
2020-09-11 09:15:58 -04:00
Dylan Thacker-Smith
bbc56f35ec
Add ParseContext#new_block_body to centralize the liquid-c override point
2020-09-09 12:25:35 -04:00