Declare variables as local in pret-lam.
[matthijs/master-project/report.git] / pret-lam.lua
index 2e70001aa90ff6971f7ff89c946a2f390a22b0ba..54acfd1fd2ef6a4e3a9ce4cc7b7c85ca026be3a4 100644 (file)
@@ -24,9 +24,9 @@ local symbols = {
     -- better.
     ['*'] = {repr = '\\ast'},
     ['~'] = {repr = '\\sim'},
+    ['|'] = {repr = '\\char' .. utf.byte('|')},
 }
 
-
 -- Keywords that should be bold
 local keywords = {
     ['case'] = {},
@@ -102,6 +102,8 @@ local function do_subscripts(word)
 end
 
 local in_block = 0
+local submatches = {}
+local bases = {}
 
 -- Mark the begin of a block of lambda formatted buffers or expressions. This
 -- means that, until you call end_of_block again, the subscript bases are