Skip to content

Commit

Permalink
Further fix finding a parse state in StreamLanguage indent
Browse files Browse the repository at this point in the history
  • Loading branch information
marijnh committed Dec 1, 2024
1 parent e3ccab2 commit 28e0989
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/stream-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export class StreamLanguage<State> extends Language {
from = IndentedFrom.get(cx.state)
if (from != null && from < cx.pos - 1e4) from = undefined
}
let start = findState(this, cx.node.tree!, 0, cx.node.from, from ?? cx.pos), statePos, state
let start = findState(this, cx.node.tree!, cx.node.from, cx.node.from, from ?? cx.pos), statePos, state
if (start) { state = start.state; statePos = start.pos + 1 }
else { state = this.streamParser.startState(cx.unit) ; statePos = cx.node.from }
if (cx.pos - statePos > C.MaxIndentScanDist) return null
Expand Down

0 comments on commit 28e0989

Please sign in to comment.