mirror of
https://github.com/HybridDog/pdisc.git
synced 2025-01-10 01:20:19 +01:00
fix parsing lables, untested
M parser.lua
This commit is contained in:
parent
5d9ca414fe
commit
a9730330c6
@ -1,4 +1,4 @@
|
|||||||
local function parse_zeile(marken, imms, z, zn)
|
local function parse_zeile(marken, imms, z, ip)
|
||||||
-- Kommentar entfernen
|
-- Kommentar entfernen
|
||||||
local komment = z:find";"
|
local komment = z:find";"
|
||||||
if komment then
|
if komment then
|
||||||
@ -14,7 +14,7 @@ local function parse_zeile(marken, imms, z, zn)
|
|||||||
local marke = z:find":"
|
local marke = z:find":"
|
||||||
if marke then
|
if marke then
|
||||||
local mname = z:sub(1, marke - 1)
|
local mname = z:sub(1, marke - 1)
|
||||||
marken[mname] = zn
|
marken[mname] = ip
|
||||||
|
|
||||||
z = z:sub(marke+1):trim()
|
z = z:sub(marke+1):trim()
|
||||||
if #z == 0 then
|
if #z == 0 then
|
||||||
@ -65,7 +65,7 @@ return function(programm)
|
|||||||
local anz = 0
|
local anz = 0
|
||||||
local liste = {}
|
local liste = {}
|
||||||
for i = 1,#zeilen do
|
for i = 1,#zeilen do
|
||||||
local befehl = parse_zeile(marken, imms, zeilen[i], i)
|
local befehl = parse_zeile(marken, imms, zeilen[i], anz + 1)
|
||||||
if befehl[1] then
|
if befehl[1] then
|
||||||
anz = anz + 1
|
anz = anz + 1
|
||||||
liste[anz] = befehl
|
liste[anz] = befehl
|
||||||
|
Loading…
Reference in New Issue
Block a user