aboutsummaryrefslogtreecommitdiff
path: root/frontend/syntax.dcl
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/syntax.dcl')
-rw-r--r--frontend/syntax.dcl13
1 files changed, 10 insertions, 3 deletions
diff --git a/frontend/syntax.dcl b/frontend/syntax.dcl
index 41eb1dd..e28c750 100644
--- a/frontend/syntax.dcl
+++ b/frontend/syntax.dcl
@@ -96,10 +96,17 @@ instance == FunctionOrMacroIndex
, mod_type :: !ModuleKind
, mod_imports :: ![ParsedImport]
, mod_imported_objects :: ![ImportedObject]
- , mod_foreign_exports :: ![IdentPos]
+ , mod_foreign_exports :: ![ParsedForeignExport]
, mod_defs :: !defs
}
+:: ParsedForeignExport =
+ { pfe_ident :: !Ident
+ , pfe_line :: !Int
+ , pfe_file :: !FileName
+ , pfe_stdcall :: !Bool
+ }
+
:: ParsedModule :== Module [ParsedDefinition]
:: ScannedModule :== Module (CollectedDefinitions (ParsedInstance FunDef) IndexRange)
@@ -175,7 +182,7 @@ cIsNotAFunction :== False
| PD_Instances [ParsedInstance ParsedDefinition]
| PD_Import [ParsedImport]
| PD_ImportedObjects [ImportedObject]
- | PD_ForeignExport !Ident !{#Char} !Int
+ | PD_ForeignExport !Ident !{#Char} !Int !Bool /* if stdcall */
| PD_Generic GenericDef // AA
| PD_GenericCase GenericCaseDef // AA
| PD_Derive [GenericCaseDef] // AA
@@ -1327,7 +1334,7 @@ instance == OverloadedListType
= CP_Expression !Expression
| CP_FunArg !Ident !Int // Function symbol, argument position (>=1)
| CP_LiftedFunArg !Ident !Ident // Function symbol, lifted argument ident
-
+
:: IdentPos =
{ ip_ident :: !Ident
, ip_line :: !Int