Skip to content

dot-notation is often omitted #166

@gebner

Description

@gebner

Lean 3:

/-- Matches one out of a list of characters. -/
def one_of (cs : list char) : parser char :=
decorate_errors (do c ← cs, return c.to_string) $
sat (∈ cs)

Synport:

/-- Matches one out of a list of characters. -/
def oneOf (cs : List Charₓ) : Parser Charₓ :=
  (decorateErrors do
      let c ← cs
      return c) <|
    sat (· ∈ cs)

Note that the .to_string disappears.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions