Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

withoutPosition とは何か #1567

Open
Seasawher opened this issue Feb 12, 2025 · 0 comments
Open

withoutPosition とは何か #1567

Seasawher opened this issue Feb 12, 2025 · 0 comments
Labels
メモ 解決済みにすることを目指さず、残しておくもの

Comments

@Seasawher
Copy link
Member

/-- `withoutPosition(p)` runs `p` without the saved position, meaning that position-checking
parsers like `colGt` will have no effect. This is usually used by bracketing constructs like
`(...)` so that the user can locally override whitespace sensitivity.

This parser has the same arity as `p` - it just forwards the results of `p`. -/
@[builtin_doc] def withoutPosition (p : Parser) : Parser :=
  adaptCacheableContext ({ · with savedPos? := none }) p
@Seasawher Seasawher added the メモ 解決済みにすることを目指さず、残しておくもの label Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
メモ 解決済みにすることを目指さず、残しておくもの
Projects
None yet
Development

No branches or pull requests

1 participant