Remove Need For " ("

This commit is contained in:
TheBrokenRail 2024-01-06 04:06:00 -05:00
parent 861a0ab8fe
commit c7af1c95d2

View File

@ -46,12 +46,12 @@ function parseMethod(args: string, self: string, insertSelfArg: boolean) {
if (argsStart === -1) { if (argsStart === -1) {
syntaxError('Cannot Find Arguments'); syntaxError('Cannot Find Arguments');
} }
const start = args.substring(0, argsStart).split(' '); const start = args.substring(0, argsStart).trim().split(' ');
if (start.length !== 2) { if (start.length !== 2) {
syntaxError('Invalid Piece Count'); syntaxError('Invalid Piece Count');
} }
const {type, name} = parseTypeAndName([start[0]!, start[1]!]); const {type, name} = parseTypeAndName([start[0]!, start[1]!]);
const end = args.substring(argsStart + 1).split(' = '); const end = args.substring(argsStart).trim().split(' = ');
if (end.length !== 2) { if (end.length !== 2) {
syntaxError('Invalid Piece Count'); syntaxError('Invalid Piece Count');
} }
@ -90,7 +90,7 @@ export function load(target: Struct, name: string, isExtended: boolean) {
} }
data = lines.join('\n'); data = lines.join('\n');
// Line-By-Line // Iterate Over Pieces
let cursor = 0; let cursor = 0;
for (let piece of data.split(';')) { for (let piece of data.split(';')) {
// Find Start Of Command For Error Handling // Find Start Of Command For Error Handling