Commits

Jason McKesson committed b7684b2

Common structural elements.

Comments (0)

Files changed (1)

modules/CommonStruct.lua

+
+local common = {}
+
+--Iterates over all requested extensions
+--Calls Extension(hFile, extName, spec, options)
+common.extensions = 
+{ type="group",
+	{ type="ext-iter",
+		{ type="write", name="Extension(hFile, extName, spec, options)", },
+	},
+}
+
+--Iterates over every enumerator, in order:
+-- Requested extension enums.
+-- For each version:
+--  Core extension enumerators from version X
+--  Core enumerators from version X
+-- Calls Enumerator(hFile, enum, enumTable, spec, options, enumSeen)
+-- Optional small headers
+common.enumerators =
+{ type="group",
+{ type="enum-seen",
+	{ type="ext-iter",
+		{type="enum-iter",
+			{ type="write", name="SmallHeader(hFile, value, options)", value="Extension: %extName", first=true, optional=true},
+			{ type="write", name="Enumerator(hFile, enum, enumTable, spec, options, enumSeen)", },
+			{ type="blank", last=true },
+		},
+	},
+	{ type="version-iter",
+		{ type="core-ext-cull-iter",
+			{type="enum-iter",
+				{ type="write", name="SmallHeader(hFile, value, options)", value="Core Extension: %extName", first=true, optional=true},
+				{ type="write", name="Enumerator(hFile, enum, enumTable, spec, options, enumSeen)", },
+				{ type="blank", last=true },
+			},
+		},
+		{type="enum-iter",
+			{ type="write", name="SmallHeader(hFile, value, options)", value="Version: %version", first=true, optional=true},
+			{ type="write", name="Enumerator(hFile, enum, enumTable, spec, options, enumSeen)", },
+			{ type="blank", last=true },
+		},
+	},
+},
+}
+
+--Iterates over each function, in order:
+-- Requested extension functions.
+-- For each version:
+--  Core extensions from for version X
+--  Core functions from version X
+-- Calls Function(hFile, func, typemap, spec, options, funcSeen)
+-- Optional small headers.
+common.functions =
+{ type="group",
+{ type="func-seen",
+	{ type="ext-iter",
+		{type="func-iter",
+			{ type="write", name="SmallHeader(hFile, value, options)", value="Extension: %extName", first=true, optional=true},
+			{ type="write", name="Function(hFile, func, typemap, spec, options, funcSeen)", },
+			{ type="blank", last=true },
+		},
+	},
+	{ type="version-iter",
+		{ type="core-ext-cull-iter",
+			{type="func-iter",
+				{ type="write", name="SmallHeader(hFile, value, options)", value="Extension: %extName", first=true, optional=true},
+				{ type="write", name="Function(hFile, func, typemap, spec, options, funcSeen)", },
+				{ type="blank", last=true },
+			},
+		},
+		{type="func-iter",
+			{ type="write", name="SmallHeader(hFile, value, options)", value="Extension: %version", first=true, optional=true},
+			{ type="write", name="Function(hFile, func, typemap, spec, options, funcSeen)", },
+			{ type="blank", last=true },
+		},
+	},
+},
+}
+
+return common
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.