Commit e0182b3
authored
[Space Lua] Implement native Lua pattern matching engine (#1838)
* Add Lua *pattern matching engine* (`pattern.ts`) that directly ports
`lstrlib.c` semantics.
* Integrate the new engine into the `string` API for `find`, `match`,
`gmatch`, and `gsub` functions.
* Add a pattern test suite (`pattern_test.lua`) covering character
classes, repetition quantifiers, edge cases as well as error
conditions.
* Refactor `string_test.lua` to remove duplicated pattern tests that
are now covered by the pattern test suite.
* Fix `string.rep` separator support.
* Fix `string.sub` index handling.
* Remove the obsolete `string_test2.lua` file.
Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>1 parent 8592b3a commit e0182b3
File tree
6 files changed
+1418
-954
lines changed- client/space_lua
- stdlib
6 files changed
+1418
-954
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
48 | 52 | | |
49 | 53 | | |
50 | | - | |
51 | 54 | | |
52 | 55 | | |
53 | 56 | | |
| |||
0 commit comments