Skip to content

Commit

Permalink
コードを簡略化する
Browse files Browse the repository at this point in the history
  • Loading branch information
Seasawher committed Nov 16, 2024
1 parent eae5d0f commit 407bbf3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions LeanByExample/Reference/Type/Syntax.lean
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ open Lean Parser

/-- `s : String` をパースして `Syntax` の項を得る。`cat` は構文カテゴリ。-/
def parse (cat : Name) (s : String) : MetaM Syntax := do
let .ok s := runParserCategory (← getEnv) cat s | throwError s
return s
ofExcept <| runParserCategory (← getEnv) cat s

-- `true` は識別子としてパースされている。
/--
Expand Down

0 comments on commit 407bbf3

Please sign in to comment.