all repos — min @ 13d96beec85f61fa1faea470343977038c6b8060

A small but practical concatenative programming language.

Removed unnecessary pragmas.
h3rald h3rald@h3rald.com
Sat, 28 Oct 2023 15:08:48 +0200
commit

13d96beec85f61fa1faea470343977038c6b8060

parent

8db97ae1667dab6465f0df6346a0fafa158d4095

3 files changed, 14 insertions(+), 22 deletions(-)

jump to
M minpkg/core/interpreter.nimminpkg/core/interpreter.nim

@@ -410,8 +410,7 @@ i.stackcopy = i2.stackcopy

i.stack = i2.stack i.scope = i2.scope -proc require*(i: In, s: string, parseOnly = false): MinValue {.discardable, - extern: "min_exported_symbol_$1".} = +proc require*(i: In, s: string, parseOnly = false): MinValue {.discardable.} = if CACHEDMODULES.hasKey(s): return CACHEDMODULES[s] var fileLines = newSeq[string](0)
M minpkg/core/parser.nimminpkg/core/parser.nim

@@ -158,8 +158,7 @@

proc raiseEmptyStack*() = raise MinEmptyStackError(msg: "Insufficient items on the stack") -proc dVal*(v: MinValue): CritBitTree[MinOperator] {.inline, - extern: "min_exported_symbol_$1".} = +proc dVal*(v: MinValue): CritBitTree[MinOperator] {.inline.} = if v.kind != minDictionary: raiseInvalid("dVal - Dictionary expected, got " & $v.kind) if v.scope.isNil:

@@ -212,31 +211,27 @@ my.state = @[stateStart]

my.kind = eMinError my.a = "" -proc close*(my: var MinParser) {.inline, extern: "min_exported_symbol_$1".} = +proc close*(my: var MinParser) {.inline.} = lexbase.close(my) -proc getInt*(my: MinParser): int {.inline, extern: "min_exported_symbol_$1".} = +proc getInt*(my: MinParser): int {.inline.} = assert(my.kind == eMinInt) return parseint(my.a) -proc getFloat*(my: MinParser): float {.inline, - extern: "min_exported_symbol_$1".} = +proc getFloat*(my: MinParser): float {.inline.} = assert(my.kind == eMinFloat) return parseFloat(my.a) -proc kind*(my: MinParser): MinEventKind {.inline, - extern: "min_exported_symbol_$1".} = +proc kind*(my: MinParser): MinEventKind {.inline.} = return my.kind -proc getColumn*(my: MinParser): int {.inline, - extern: "min_exported_symbol_$1".} = +proc getColumn*(my: MinParser): int {.inline.} = result = getColNumber(my, my.bufpos) -proc getLine*(my: MinParser): int {.inline, extern: "min_exported_symbol_$1".} = +proc getLine*(my: MinParser): int {.inline.} = result = my.lineNumber -proc getFilename*(my: MinParser): string {.inline, - extern: "min_exported_symbol_$1".} = +proc getFilename*(my: MinParser): string {.inline.} = result = my.filename proc errorMsg*(my: MinParser, msg: string): string =

@@ -251,8 +246,7 @@

proc errorMsgExpected*(my: MinParser, e: string): string = result = errorMsg(my, e & " expected") -proc raiseParsing*(p: MinParser, msg: string) {.noinline, noreturn, - extern: "min_exported_symbol_$1".} = +proc raiseParsing*(p: MinParser, msg: string) {.noinline, noreturn.} = raise MinParsingError(msg: errorMsgExpected(p, msg)) proc raiseUndefined*(p: MinParser, msg: string) {.noinline, noreturn,

@@ -667,7 +661,7 @@ proc eat(p: var MinParser, token: MinTokenKind) =

if p.token == token: discard getToken(p) else: raiseParsing(p, tokToStr[token]) -proc `$`*(a: MinValue): string {.inline, extern: "min_exported_symbol_$1".} = +proc `$`*(a: MinValue): string {.inline.} = case a.kind: of minNull: return "null"

@@ -714,7 +708,7 @@ return d

of minCommand: return "[" & a.cmdVal & "]" -proc `$$`*(a: MinValue): string {.inline, extern: "min_exported_symbol_$1".} = +proc `$$`*(a: MinValue): string {.inline.} = case a.kind: of minNull: return "null"
M minpkg/core/utils.nimminpkg/core/utils.nim

@@ -69,8 +69,7 @@ if not q.isDictionary:

raiseInvalid("Value is not a dictionary") return q.dVal.contains(s) -proc ddel*(i: In, p: var MinValue, s: MinValue): MinValue {.discardable, - extern: "min_exported_symbol_$1".} = +proc ddel*(i: In, p: var MinValue, s: MinValue): MinValue {.discardable.} = if not p.isDictionary: raiseInvalid("Value is not a dictionary") excl(p.scope.symbols, s.getString)

@@ -84,7 +83,7 @@ excl(p.scope.symbols, s)

return p proc dset*(i: In, p: var MinValue, s: MinValue, - m: MinValue): MinValue {.discardable, extern: "min_exported_symbol_$1".} = + m: MinValue): MinValue {.discardable.} = if not p.isDictionary: raiseInvalid("Value is not a dictionary") var q = m