[main] fix initializer of MD_Node

This commit is contained in:
Allen Webster
2021-03-30 20:52:22 -07:00
parent c30090c483
commit cc38ed2c96
3 changed files with 58 additions and 38 deletions
+19 -5
View File
@@ -198,9 +198,12 @@
////////////////////////////////
//~ Code Location Info.
@doc("Source code location using file, line, column coordinates")
@struct MD_CodeLoc: {
filename: MD_String8,
@doc("Line numbers are 1 based, the lowest valid location is on line number 1.")
line: MD_u32,
@doc("Column numbers are 1 based, the lowest valid location is on column number 1.")
column: MD_u32,
};
@@ -815,6 +818,22 @@
return: MD_ParseResult,
};
////////////////////////////////
//~ Location Conversion
@func MD_CodeLocFromFileOffset: {
filename: MD_String8,
base: *MD_u8,
off: *MD_u8,
return: MD_CodeLoc,
};
@func MD_CodeLocFromNode: {
node: *MD_Node,
return: MD_CodeLoc,
};
////////////////////////////////
//~ Tree/List Building
@@ -927,11 +946,6 @@
return: MD_b32,
};
@func MD_CodeLocFromNode: {
node: *MD_Node,
return: MD_CodeLoc,
};
@func MD_ChildCountFromNode: {
node: *MD_Node,
return: MD_i64,