aboutsummaryrefslogtreecommitdiff
path: root/Sil/Syntax.dcl
diff options
context:
space:
mode:
Diffstat (limited to 'Sil/Syntax.dcl')
-rw-r--r--Sil/Syntax.dcl15
1 files changed, 10 insertions, 5 deletions
diff --git a/Sil/Syntax.dcl b/Sil/Syntax.dcl
index 1273267..b298c19 100644
--- a/Sil/Syntax.dcl
+++ b/Sil/Syntax.dcl
@@ -5,11 +5,11 @@ from StdOverloaded import class toString
from Data.Maybe import :: Maybe
from Sil.Types import :: Type
-from Sil.Util.Parser import :: Positioned
+from Sil.Util.Parser import :: ParsePosition, class getPos
:: Program =
- { p_funs :: [Positioned Function]
- , p_globals :: [Positioned Initialisation]
+ { p_funs :: [Function]
+ , p_globals :: [Initialisation]
}
:: Function =
@@ -17,11 +17,12 @@ from Sil.Util.Parser import :: Positioned
, f_name :: Name
, f_args :: [Arg]
, f_code :: CodeBlock
+ , f_pos :: ParsePosition
}
:: CodeBlock =
- { cb_init :: [Positioned Initialisation]
- , cb_content :: [Positioned Statement]
+ { cb_init :: [Initialisation]
+ , cb_content :: [Statement]
}
:: Arg =
@@ -33,6 +34,7 @@ from Sil.Util.Parser import :: Positioned
{ init_type :: Type
, init_name :: Name
, init_value :: Maybe Expression
+ , init_pos :: ParsePosition
}
:: Statement
@@ -86,6 +88,9 @@ instance toString Op1
instance toString Op2
instance toString Literal
+instance getPos Function
+instance getPos Initialisation
+
class allStatements a :: a -> [Statement]
instance allStatements Program
instance allStatements Function