Bugfix in collections, better Ostap, more Stdlib, bugfix in runtime

This commit is contained in:
Dmitry Boulytchev 2020-03-13 19:41:14 +03:00
parent 78305d22b3
commit 5db12d7629
10 changed files with 128 additions and 40 deletions

View file

@ -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)