Missing string functions + other fixes #35
Conversation
…_to_regex() in string.gsub()
…ttern) instead of the whole match
…ng (only partial support, several cases will not work)
…herever there is other characters than digits, dots or spaces in the input string (like Lua's tonumber() does)
… in the pattern (like I did on november 9 with lua_gmatch_next() )
…ad of an array (no matter the arraymode property)
…tern to call not_supported()
…he captured chunks (if any)
…or one or more endChar before the first startChar
…t, fixed plain argument condition
…changed returned value of processMath()
…ted patterns in lua_pattern_to_regex()
Resume of what I did since the last batch of commits :
The cases where I had table.arraymode set to true but table.uints as object is fixed. It was due to another technology (CraftStudio's web player) that would add arraymode itself, yet left table.uints as an object. I am new to node.js and I couldn't find how to run the tests in the "tests" folder. Which is why I hadn't them included in the pull request yet. Can you explain ? Thanks ! |
…unction + updated tests
@florentpoujol looking at the package.json file, you should be able to run the tests with |
@mherkender Hey, can you find time to review my latest commits ? Thanks ! |
@mherkender They have been used without issues in several of my projects. |
Hey
I added the missing string functions : find, format, gsub, gmatch and match.
All cases of pattern translation I encountered are working OK (yet there are probably many cases that won't).
I also fixed several other functions like ensure_arraymode(), pairs(), tonumber(), os.clock().