mirror of
https://github.com/KarolS/millfork.git
synced 2024-12-22 16:31:02 +00:00
Allow spaces after the array keyword (fixes #120)
This commit is contained in:
parent
3b0aa9a425
commit
84dde8589c
@ -403,7 +403,7 @@ abstract class MfParser[T](fileId: String, input: String, currentDirectory: Stri
|
|||||||
p <- position("array definition")
|
p <- position("array definition")
|
||||||
bank <- bankDeclaration
|
bank <- bankDeclaration
|
||||||
const <- ("const".! ~ HWS).?
|
const <- ("const".! ~ HWS).?
|
||||||
_ <- "array" ~ !letterOrDigit
|
_ <- "array" ~ !letterOrDigit ~ HWS
|
||||||
elementType <- ("(" ~/ AWS ~/ identifier ~ AWS ~ ")").? ~/ HWS
|
elementType <- ("(" ~/ AWS ~/ identifier ~ AWS ~ ")").? ~/ HWS
|
||||||
name <- identifier ~/ HWS
|
name <- identifier ~/ HWS
|
||||||
length <- ("[" ~/ AWS ~/ mfExpression(nonStatementLevel, false) ~ AWS ~ "]").? ~ HWS
|
length <- ("[" ~/ AWS ~/ mfExpression(nonStatementLevel, false) ~ AWS ~ "]").? ~ HWS
|
||||||
|
@ -666,7 +666,7 @@ class ArraySuite extends FunSuite with Matchers with AppendedClues {
|
|||||||
EmuUnoptimizedCrossPlatformRun(Cpu.Mos/*, Cpu.Intel8080, Cpu.Z80, Cpu.Motorola6809*/)(
|
EmuUnoptimizedCrossPlatformRun(Cpu.Mos/*, Cpu.Intel8080, Cpu.Z80, Cpu.Motorola6809*/)(
|
||||||
"""
|
"""
|
||||||
| struct s { word x, word y}
|
| struct s { word x, word y}
|
||||||
| array(s) a[7]
|
| array (s) a[7]
|
||||||
| word output @$c000
|
| word output @$c000
|
||||||
|
|
|
|
||||||
| void main () {
|
| void main () {
|
||||||
|
Loading…
Reference in New Issue
Block a user