mirror of
https://github.com/fadden/6502bench.git
synced 2025-08-05 09:25:39 +00:00
Allow leading whitespace in .sym65 comments
We allow empty lines and lines that begin with ';' in .sym65. Lines with nothing but whitespace, or comments with leading whitespace, caused a warning. It can be aesthetically nice to line up the start of comments, and lines with pointless whitespace aren't problematic, so we now allow these without complaint. Added some samples to the 20170-external-symbols data file. No change to the test output.
This commit is contained in:
@@ -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);
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user