Skip to content

Баг с пробелами  #1

Description

@jeinygroove

Я тут попробовала потестить parseExpr и увидела вот это:
runParser parseExpr "-1 == -2" @?= Success (toStream "" (Position 0 8)) (BinOp Equal (UnaryOp Minus (Num 1)) (UnaryOp Minus (Num 2)))

Результат теста:
`test/Test/Expr.hs:101:
expected: Parsing succeeded!
Result:

    ==
    |_-
    | |_1
    |_-
    | |_2
    Suffix:	InputStream {stream = "", curPos = Position {line = 0, col = 8}}
     but got: Parsing succeeded!
    Result:
    
    -
    |_1
    Suffix:	InputStream {stream = "== -2", curPos = Position {line = 0, col = 4}}`

Почему то оно не хочет (не может/etc) читать пробелы. При этом деление 1 / x нормально относится к пробелам, например.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions