From e341ae62f15d59f64c66cc0abdf628fb160506e0 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Tue, 15 Aug 2017 16:05:26 +0200 Subject: Made some more errors positional (#5) --- Sil/Syntax.dcl | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'Sil/Syntax.dcl') diff --git a/Sil/Syntax.dcl b/Sil/Syntax.dcl index 4f0ddf9..b99153e 100644 --- a/Sil/Syntax.dcl +++ b/Sil/Syntax.dcl @@ -46,14 +46,14 @@ from Sil.Util.Parser import :: ParsePosition, class getPos | MachineStm ParsePosition String :: Expression - = Name Name - | Literal Literal - | App Name [Expression] - | BuiltinApp Op1 Expression - | BuiltinApp2 Expression Op2 Expression - | Field Name Expression - | Tuple Int [Expression] - | List (Maybe Type) [Expression] + = Name ParsePosition Name + | Literal ParsePosition Literal + | App ParsePosition Name [Expression] + | BuiltinApp ParsePosition Op1 Expression + | BuiltinApp2 ParsePosition Expression Op2 Expression + | Field ParsePosition Name Expression + | Tuple ParsePosition Int [Expression] + | List ParsePosition (Maybe Type) [Expression] :: Op1 = Neg //* ~ @@ -91,6 +91,7 @@ instance toString Literal instance getPos Function instance getPos Initialisation instance getPos Statement +instance getPos Expression class allStatements a :: a -> [Statement] instance allStatements Program -- cgit v1.2.3