Allow spaces after the array keyword (fixes #120)

This commit is contained in:
Karol Stasiak 2021-09-13 09:26:54 +02:00
parent 3b0aa9a425
commit 84dde8589c
2 changed files with 2 additions and 2 deletions

View File

@ -403,7 +403,7 @@ abstract class MfParser[T](fileId: String, input: String, currentDirectory: Stri
p <- position("array definition")
bank <- bankDeclaration
const <- ("const".! ~ HWS).?
_ <- "array" ~ !letterOrDigit
_ <- "array" ~ !letterOrDigit ~ HWS
elementType <- ("(" ~/ AWS ~/ identifier ~ AWS ~ ")").? ~/ HWS
name <- identifier ~/ HWS
length <- ("[" ~/ AWS ~/ mfExpression(nonStatementLevel, false) ~ AWS ~ "]").? ~ HWS

View File

@ -666,7 +666,7 @@ class ArraySuite extends FunSuite with Matchers with AppendedClues {
EmuUnoptimizedCrossPlatformRun(Cpu.Mos/*, Cpu.Intel8080, Cpu.Z80, Cpu.Motorola6809*/)(
"""
| struct s { word x, word y}
| array(s) a[7]
| array (s) a[7]
| word output @$c000
|
| void main () {