mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-31 19:18:18 +00:00
Bugfix in collections, better Ostap, more Stdlib, bugfix in runtime
This commit is contained in:
parent
78305d22b3
commit
5db12d7629
10 changed files with 128 additions and 40 deletions
|
|
@ -71,14 +71,16 @@ fun createMatcher (buf, pos, line, col) {
|
|||
[show,
|
||||
eof,
|
||||
matchString,
|
||||
matchRegexp]
|
||||
matchRegexp,
|
||||
fun () {line},
|
||||
fun () {col}]
|
||||
}
|
||||
|
||||
public fun show (m) {
|
||||
public fun showMatcher (m) {
|
||||
m [0] ()
|
||||
}
|
||||
|
||||
public fun endOf (m) {
|
||||
public fun endOfMatcher (m) {
|
||||
m [1] ()
|
||||
}
|
||||
|
||||
|
|
@ -91,6 +93,16 @@ public fun matchRegexp (m, r) {
|
|||
m [3] (r)
|
||||
}
|
||||
|
||||
-- Gets a line number
|
||||
public fun getLine (m) {
|
||||
m [4] ()
|
||||
}
|
||||
|
||||
-- Gets a column number
|
||||
public fun getCol (m) {
|
||||
m [5] ()
|
||||
}
|
||||
|
||||
-- Creates a fresh matcher from a string buffer
|
||||
public fun initMatcher (buf) {
|
||||
createMatcher (buf, 0, 1, 1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue