From b756c08f2eea89ef5e771260b2ab48183405f498 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20M=C3=BCller?= Date: Wed, 29 Sep 2010 23:46:45 +0200 Subject: [PATCH] - Code clean-up --- pret-pas.lua | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/pret-pas.lua b/pret-pas.lua index 2385260..f2e4d46 100644 --- a/pret-pas.lua +++ b/pret-pas.lua @@ -62,24 +62,22 @@ local function flush_pas_word(word) if word then local id = known_words[word] if id then - tex.sprint(tex.ctxcatcodes,"\{\\bf ") + tex.sprint(tex.ctxcatcodes, "\{\\bf ") tex.write(word) - tex.sprint(tex.ctxcatcodes,"\}") + tex.sprint(tex.ctxcatcodes, "\}") else tex.write(word) end end end -local incomment, inlongstring = false, false -local incompdirec, inasm = false, false +local incomment, inlongstring, incompdirec, inasm = false, false, false, false function visualizer.reset() - incomment, inlongstring = false, false - incompdirec, inasm = false, false + incomment, inlongstring, incompdirec, inasm = false, false, false, false end -local function written(state, c, i) +--[[local function written(state, c, i) if c == " " then state = buffers.finishstate(state) tex.sprint(tex.ctxcatcodes,"\\obs") @@ -93,7 +91,7 @@ local function written(state, c, i) tex.write(c) end return state, 0 -end +end]] function visualizer.flush_line(str, nested) local state, instr, inesc, word = 0, false, false, nil @@ -124,12 +122,12 @@ function visualizer.flush_line(str, nested) word = nil if c == " " then state = buffers.finishstate(state) - tex.sprint(tex.ctxcatcodes,"\\obs") + tex.sprint(tex.ctxcatcodes, "\\obs") elseif c == "\t" then state = buffers.finishstate(state) - tex.sprint(tex.ctxcatcodes,"\\obs") + tex.sprint(tex.ctxcatcodes, "\\obs") if buffers.visualizers.enabletab then - tex.sprint(tex.ctxcatcodes,rep("\\obs ",buffers.visualizers.tablength)) + tex.sprint(tex.ctxcatcodes,rep("\\obs ", buffers.visualizers.tablength)) end else -- symbol