diff options
author | Camil Staps | 2017-07-30 00:51:48 +0200 |
---|---|---|
committer | Camil Staps | 2017-07-30 00:54:02 +0200 |
commit | 05a47988d9466b827f7dbab44bab33a67228efe9 (patch) | |
tree | c9f2ce96dec969f1d756e25357dbbe2c79dfbad2 /Sil/Syntax.icl | |
parent | Cleanup; add <> < > <= >= (diff) |
Start with positional errors (see #5)
Diffstat (limited to 'Sil/Syntax.icl')
-rw-r--r-- | Sil/Syntax.icl | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Sil/Syntax.icl b/Sil/Syntax.icl index 65cb5c5..a8a0631 100644 --- a/Sil/Syntax.icl +++ b/Sil/Syntax.icl @@ -10,6 +10,7 @@ import Data.Maybe import Text import Sil.Types +import Sil.Util.Parser import Sil.Util.Printer instance toString Statement @@ -65,13 +66,13 @@ where toString (ILit i) = toString i instance allStatements Program -where allStatements p = concatMap allStatements p.p_funs +where allStatements p = concatMap (allStatements o fromPositioned) p.p_funs instance allStatements Function where allStatements f = allStatements f.f_code instance allStatements CodeBlock -where allStatements cb = concatMap allStatements cb.cb_content +where allStatements cb = concatMap (allStatements o fromPositioned) cb.cb_content instance allStatements Statement where @@ -86,7 +87,7 @@ where instance allCodeBlocks Function where allCodeBlocks f = allCodeBlocks f.f_code instance allCodeBlocks CodeBlock -where allCodeBlocks cb = [cb:concatMap allCodeBlocks cb.cb_content] +where allCodeBlocks cb = [cb:concatMap (allCodeBlocks o fromPositioned) cb.cb_content] instance allCodeBlocks Statement where @@ -101,4 +102,4 @@ where allLocals f.f_code instance allLocals CodeBlock -where allLocals cb = [(i.init_type, i.init_name) \\ i <- cb.cb_init] +where allLocals cb = [(i.init_type, i.init_name) \\ i <- map fromPositioned cb.cb_init] |