keep parameters out of call target

This commit is contained in:
Denis Molony 2021-02-20 19:33:53 +10:00
parent 6a1f7043cb
commit 506742bbac
2 changed files with 6 additions and 3 deletions

View File

@ -331,7 +331,7 @@ public class SubLine implements ApplesoftConstants
break;
case TOKEN_CALL:
callTarget = getExpression ();
callTarget = getCallTarget ();
break;
case TOKEN_DEF:
@ -398,7 +398,7 @@ public class SubLine implements ApplesoftConstants
}
// ---------------------------------------------------------------------------------//
private String getExpression ()
private String getCallTarget ()
// ---------------------------------------------------------------------------------//
{
StringBuilder text = new StringBuilder ();
@ -410,6 +410,8 @@ public class SubLine implements ApplesoftConstants
byte b = buffer[ptr++];
if (isToken (b))
text.append (tokens[b & 0x7F]);
else if (b == Utility.ASCII_COMMA) // end of call target
break;
else
text.append ((char) b);
}
@ -576,7 +578,7 @@ public class SubLine implements ApplesoftConstants
if (isFirst ())
{
text.setLength (0);
text.append (String.format (" %d REM ", parent.lineNumber));
text.append (String.format (" %d REM ", parent.lineNumber)); // mimic apple
}
else
text.append ("REM ");

View File

@ -25,6 +25,7 @@ public class Utility
public static final byte ASCII_PERCENT = 0x25;
public static final byte ASCII_LEFT_BRACKET = 0x28;
public static final byte ASCII_RIGHT_BRACKET = 0x29;
public static final byte ASCII_COMMA = 0x2C;
public static final byte ASCII_MINUS = 0x2D;
public static final byte ASCII_DOT = 0x2E;
public static final byte ASCII_COLON = 0x3A;