diff --git a/SourceGen/PlatformSymbols.cs b/SourceGen/PlatformSymbols.cs index 65ab484..4039bfc 100644 --- a/SourceGen/PlatformSymbols.cs +++ b/SourceGen/PlatformSymbols.cs @@ -141,8 +141,9 @@ namespace SourceGen { int lineNum = 0; foreach (string line in lines) { lineNum++; // first line is line 1, says Vim and VisualStudio - if (string.IsNullOrEmpty(line) || line[0] == ';') { - // ignore + string trimLine = line.Trim(); + if (string.IsNullOrEmpty(trimLine) || trimLine[0] == ';') { + // all whitespace, or just a comment; ignore } else if (line[0] == '*') { if (line.StartsWith(TAG_CMD)) { tag = ParseTag(line); diff --git a/SourceGen/SGTestData/20170-external-symbols-1.sym65 b/SourceGen/SGTestData/20170-external-symbols-1.sym65 index 2ee61e4..a553b13 100644 --- a/SourceGen/SGTestData/20170-external-symbols-1.sym65 +++ b/SourceGen/SGTestData/20170-external-symbols-1.sym65 @@ -121,3 +121,11 @@ TooLong @ $c0f8 $a *MULTI_MASK $ffff $ffff $fffff ;range *MULTI_MASK + + +; The following lines have nothing but whitespace. + + + + ;Comment with leading spaces. + ;leading tab