mirror of
https://gitlab.os-k.eu/os-k-team/kvisc.git
synced 2023-08-25 14:05:46 +02:00
clean
This commit is contained in:
parent
cc03cc8722
commit
cf4bc26e8d
43
as/k-as.py
43
as/k-as.py
@ -158,47 +158,6 @@ def parse_preproc(line):
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
def apply_pdefs(line):
|
||||
return line
|
||||
"""
|
||||
tok = line.split(' ', 1)
|
||||
|
||||
instr = tok[0]
|
||||
|
||||
new = '' + tok[0]
|
||||
|
||||
for word in tok[1:]:
|
||||
word = word.strip()
|
||||
new += ' '
|
||||
|
||||
print(word)
|
||||
if '[' in word:
|
||||
assert(len(word) > 2)
|
||||
assert(word[-1] == ']')
|
||||
assert(word[1:].strip()[0] == '[')
|
||||
new += word[0] + '['
|
||||
word = word[1:-1]
|
||||
need_bracket = True
|
||||
else:
|
||||
need_bracket = False
|
||||
|
||||
if word in pdefs:
|
||||
word = pdefs[word]
|
||||
|
||||
if not name_valid(word):
|
||||
print("Invalid token in line: {}".format(line))
|
||||
leave()
|
||||
sys.exit(1)
|
||||
return None
|
||||
|
||||
new += word
|
||||
|
||||
if need_bracket:
|
||||
new += ']'
|
||||
|
||||
return new
|
||||
"""
|
||||
|
||||
def parse():
|
||||
global ptext
|
||||
global plastlabel
|
||||
@ -219,8 +178,6 @@ def parse():
|
||||
|
||||
if line[0] == ' ' or line[0] == '\t':
|
||||
line = line.lstrip()
|
||||
|
||||
line = apply_pdefs(line)
|
||||
ptext += parse_instr(line)
|
||||
instrs.write("\n")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user