mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-07-14 14:01:55 +00:00
Initial instance methods and field layout; More cleanup
This commit is contained in:
@ -68,9 +68,9 @@ export function nextFile(parser: Parser): string | null {
|
||||
/** Obtains the next diagnostic message. Returns `null` once there are no more messages. */
|
||||
export function nextDiagnostic(parser: Parser): DiagnosticMessage | null {
|
||||
var program = parser.program;
|
||||
if (program.diagnosticsOffset < program.diagnostics.length)
|
||||
return program.diagnostics[program.diagnosticsOffset++];
|
||||
return null;
|
||||
return program.diagnosticsOffset < program.diagnostics.length
|
||||
? program.diagnostics[program.diagnosticsOffset++]
|
||||
: null;
|
||||
}
|
||||
|
||||
/** Formats a diagnostic message to a string. */
|
||||
|
Reference in New Issue
Block a user