Remove Need For " ("
This commit is contained in:
parent
861a0ab8fe
commit
c7af1c95d2
@ -42,16 +42,16 @@ function parseProperty(args: string) {
|
|||||||
|
|
||||||
// Parse Method
|
// Parse Method
|
||||||
function parseMethod(args: string, self: string, insertSelfArg: boolean) {
|
function parseMethod(args: string, self: string, insertSelfArg: boolean) {
|
||||||
const argsStart = args.indexOf(' (');
|
const argsStart = args.indexOf('(');
|
||||||
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
|
||||||
|
Loading…
Reference in New Issue
Block a user