Łukasz Kuczborski
7c635975d1
Fix for crashing range indexes when variable length is 1
2021-04-09 22:51:55 +02:00
David Jennes
19646bcddf
Update SwiftLint to 0.39.2 ( #295 )
...
* Update SwiftLint to 0.39.2
* Enable a bunch of extra rules
* Fix all warnings
* Ignore this Xcode generated folder
Co-authored-by: Olivier Halligon <olivier@halligon.net >
2020-08-12 22:52:00 +02:00
Andreas Ley
a1718ae350
Fix for incorrect tokenization due to index difference of Unicode character/scalar ( #286 )
...
* Fix: `Scanner` now uses indices of the respective UnicodeScalarView
* Fix: `Scanner` now uses indices of the respective UnicodeScalarView
* Extended test for Unicode `Combining Diaeresis`
* Fixed test for combining diaeresis
* Inlined template for testing Unicode combining diaeresis
Co-authored-by: Ilya Puchka <ilyapuchka@gmail.com >
2020-01-12 15:21:02 +00:00
kawoou
4020a9851a
Test: SIL issues, #file as String
2019-04-15 13:35:33 +09:00
kawoou
3c973689a4
Fix swift SIL exception
2019-04-05 14:26:02 +09:00
Ilya Puchka
693565ddda
syntax error on empty variable tag
2019-01-12 22:28:09 +00:00
David Jennes
9243bba2b7
Fix typo in "InheritenceSpec"
2018-11-11 17:34:47 +01:00
David Jennes
2d82dcb003
Fix issues in Tests
...
t
2018-11-11 17:34:47 +01:00
David Jennes
799490198f
Rules
...
rules
rules
2018-11-11 15:52:43 +01:00
Ilya Puchka
08fc21d177
Merge branch 'master' into dynamic-filter
2018-10-01 22:45:21 +01:00
Ilya Puchka
dbb5e14e9f
solve merge conflict issues
2018-10-01 21:59:03 +01:00
Ilya Puchka
0269052d6a
Merge branch 'master' into dynamic-filter
...
# Conflicts:
# CHANGELOG.md
# Sources/ForTag.swift
# Sources/IfTag.swift
# Sources/Parser.swift
# Sources/Variable.swift
# Tests/StencilTests/ExpressionSpec.swift
# Tests/StencilTests/FilterSpec.swift
# Tests/StencilTests/ForNodeSpec.swift
# Tests/StencilTests/VariableSpec.swift
2018-10-01 21:21:56 +01:00
Ilya Puchka
01afae9b79
Fix parsing token components with parenthesis without spaces ( #254 )
...
* fix parsing token components with brackets without spaces
* handle more edge cases
* do not use force unwrap
* use first/last instead of hasPrefix/hasSuffix
* update CHANGELOG
2018-09-30 21:57:19 +01:00
Ilya Puchka
d9f6a82f97
Convert Token from enum to struct ( #256 )
...
* convert Token from enum to struct
* private setter for components
* updated CHANGELOG
2018-09-30 21:48:44 +01:00
David Jennes
2e67755118
Fix a bug where tokens without spaces were parsed incorrectly
2018-09-26 03:06:49 +02:00
David Jennes
fff93f18dd
Add performance test (no reporting yet)
2018-09-26 00:33:15 +02:00
David Jennes
652dcd246d
Add lexer test for escape sequence
2018-09-26 00:33:15 +02:00
David Jennes
4f84627caa
Add test for crashing
2018-09-26 00:33:15 +02:00
Ilya Puchka
fce3dc5e48
Added method to register boolean filters ( #160 )
...
* added method to register boolean filters
* parametrised negative filter name
* Update Extension.swift
* Update CHANGELOG.md
* renamed registerBooleanFilter to registerFilter
* updated docs
2018-09-25 23:29:21 +01:00
Ilya Puchka
f7bda226e8
Update to Spectre 0.9.0 ( #247 )
...
* update to Spectre 0.9.0
* fix variable spec tests
* fix flatMap warning
* updated CHANGELOG
2018-09-23 03:46:27 +03:00
Ilya Puchka
d238c25eef
Allow using collection accessors on strings ( #245 )
...
* allow using collection accessors on strings
* refactored resolving collection accessors
* refactored to fileprivate function
* Update Variable.swift
* Update templates.rst
2018-09-22 16:41:45 +03:00
Ilya Puchka
df2e193891
Allow conditions in variable node ( #243 )
...
* use condition in variable node
* added support for else expression
* addressing code review comments
2018-09-22 14:09:25 +03:00
Ilya Puchka
2c3962a3de
Added support for brackets in boolean expressions ( #165 )
...
* added support for brackets in boolean expressions
* more descriptive error messages
* use array slices
* added test for nested expressions
* removed brackets validation step
* address code review comments
* added doc comment
* simplify expression spec
* fixed docs
2018-09-21 22:07:28 +03:00
David Jennes
fce4e85a63
Ensure the "for" iteration over a dictionary is consistent
2018-09-21 00:17:42 +02:00
David Jennes
0d4dee29b2
Use multiline strings
...
multi
t
t
2018-09-20 04:17:42 +02:00
Ilya Puchka
0074ee1d4a
check for property via selector before using value(forKey:)
2018-09-11 18:12:27 +01:00
Yonas Kolb
420c0eacd7
update code to Swift 4.1
2018-09-10 20:59:02 +10:00
Ilya Puchka
acda1b0caf
process template lines when Lexer is created not when parsing each token. ( #230 )
2018-09-10 11:39:19 +01:00
Sébastien Duperron
00e71c1b4d
Fix typo in VariableSpec describing subscripting ( #229 )
2018-09-08 14:05:05 +01:00
Ilya Puchka
96a004eb34
replace implicitly unwrapped optional with fatalError
2018-08-14 00:56:10 +01:00
Ilya Puchka
92ebfe59b1
removed unneeded error reporter references
2018-08-13 23:05:33 +01:00
Ilya Puchka
b9702afbd4
fixed indetnations
2018-08-13 20:00:27 +01:00
Ilya Puchka
4f1a5b3e3d
store reference to token when parsing range variable
2018-08-12 22:25:25 +01:00
Ilya Puchka
3a4cd8aa27
Merge branch 'master' into errors-logs-improvements
2018-08-12 22:08:13 +01:00
Ilya Puchka
2c411ca494
Merge branch 'master' into dynamic-filter
2018-08-04 20:05:59 +01:00
David Jennes
2e18892f4c
Subscript syntax for Variables ( #215 )
...
* Implement variable indirect resolution
* Add some tests
* Changelog entry
* Update documentation
* Rework the syntax to use brackets instead of a $
* Move the lookup parser into it's own file
* Add invalid syntax tests
* Swift 3 support
* Rename some things + extra test
2018-05-19 21:03:51 +01:00
Ilya Puchka
564ccb7af7
added filter to apply dynamic filter
2018-05-13 12:46:51 +01:00
Ilya Puchka
39ed9aa753
Fixed using spaces in filter expressions and variables lists ( #178 )
...
* fixed using spaces in filter expression
* fixed breaking variables lists and filters by spaces
* simplified smartJoin
* avoid force unwrap
2018-05-13 01:06:38 +01:00
Yonas Kolb
098af2a7b6
remove "using" param name
2018-04-30 12:00:54 +10:00
Yonas Kolb
7679b48164
add contex to include
2018-04-30 11:45:22 +10:00
Ilya Puchka
7c499cc077
fix(tokeniser): Tokenising a quote inside quoted parameter ( #210 )
2018-04-17 11:28:28 -07:00
Ilya Puchka
fe01beb4bb
feat(for loop): Support range literals ( #192 )
2018-04-04 17:56:58 -07:00
Ilya Puchka
2e6a7215c5
fix: subscripting tuple by value index ( #172 )
2018-04-04 17:25:13 -07:00
Ilya Puchka
f457cddd3f
feat(for loop): added property for loop length ( #171 )
2018-04-04 17:23:02 -07:00
Ilya Puchka
6b02fccf84
feat: added support for ranges in if-in expression ( #193 )
2018-04-04 17:22:05 -07:00
Ilya Puchka
29e859f1aa
fix: Do not print Optional(...) when rendering arrays ( #205 )
2018-04-04 17:13:34 -07:00
Ilya Puchka
8fa0bd275c
fix: accessing optional properties through reflection ( #204 )
2018-04-04 17:03:19 -07:00
Kyle Fuller
86ed8770e1
Merge branch 'master' into iterating-tuple-arrays
2018-03-13 09:12:09 +00:00
Ilya Puchka
0bc6bd974e
feat: allow using new lines inside tags ( #202 )
2018-03-13 09:07:56 +00:00
Ilya Puchka
fa68ba9df8
feat: Added indent filter ( #188 )
2018-01-28 16:17:23 +00:00