diff options
author | Astatin <[email protected]> | 2024-09-27 08:46:24 +0900 |
---|---|---|
committer | Astatin <astatin@redacted> | 2024-09-27 08:46:24 +0900 |
commit | e543410ac3b4787b9922ef065a703482c3aeeb1f (patch) | |
tree | 2ae8f30a61b58cfa1f0f0e0124447e718bde9279 | |
parent | 7657996ad68689b437f742516f0f285e53e8f0e3 (diff) |
Fix JR offset inside of macros + line number in error messages
-rw-r--r-- | macros.go | 2 | ||||
-rw-r--r-- | main.go | 10 |
2 files changed, 6 insertions, 6 deletions
@@ -173,7 +173,7 @@ func MacroParse( if err != nil { return err } - new_instructions, err := secondPass("MACRO$"+definedMacroName, macroContent, offset, state) + new_instructions, err := secondPass("MACRO$"+definedMacroName, macroContent, 0, state) if err != nil { return err } @@ -56,7 +56,7 @@ func firstPass( return nil, fmt.Errorf( "File %s, line %d:\nLabel %s is already defined", input_file_name, - line_nb, + line_nb+1, label, ) } @@ -83,7 +83,7 @@ func firstPass( return nil, fmt.Errorf( "File %s, line %d (1st pass|macro):\n%w", input_file_name, - line_nb, + line_nb+1, err, ) } @@ -93,7 +93,7 @@ func firstPass( return nil, fmt.Errorf( "File %s, line %d (1st pass):\n%w", input_file_name, - line_nb, + line_nb+1, err, ) } @@ -136,7 +136,7 @@ func secondPass( return nil, fmt.Errorf( "File %s, line %d (2nd pass|macro):\n%w", input_file_name, - line_nb, + line_nb+1, err, ) } @@ -146,7 +146,7 @@ func secondPass( return nil, fmt.Errorf( "File %s, line %d (2nd pass): %w", input_file_name, - line_nb, + line_nb+1, err, ) } |