@spellu/engine
Advanced tools
Comparing version 0.7.0 to 0.7.1
{ | ||
"name": "@spellu/engine", | ||
"version": "0.7.0", | ||
"version": "0.7.1", | ||
"license": "MIT", | ||
@@ -27,3 +27,3 @@ "description": "Spellu is a parser combinator engine.", | ||
}, | ||
"gitHead": "701cb8b6b5c292ef600c17217d09137be2e81ba5" | ||
"gitHead": "877ba76feda0aa42d4e0f4f7a3ad29c193b3dbb0" | ||
} |
@@ -298,3 +298,3 @@ declare namespace spellu { | ||
recover(callback: (m: Machine) => void): Parser<V>; | ||
toString(): string; | ||
asString(): string; | ||
hook(callback: (m: Machine, r: ParserResult<V>) => void): Parser<V>; | ||
@@ -432,2 +432,11 @@ accept<T>(callback: (value: V) => T): Parser<T>; | ||
function samedent(): Parser<Indentation>; | ||
/** | ||
* look-ahead, look-behind | ||
* | ||
* @param polarity | ||
* @param offset | ||
* @param testParser | ||
* @param parser | ||
* @returns | ||
*/ | ||
function test<V>(polarity: boolean, offset: number, testParser: Parser<any>, parser: Parser<V>): Parser<V>; | ||
@@ -692,5 +701,5 @@ function not<V>(parser: Parser<V>): Parser<null>; | ||
declare namespace spellu { | ||
const enum MatchType { | ||
LeftHandMatch = 0, | ||
WholeMatch = 1 | ||
enum MatchType { | ||
LeftHandMatch = 1, | ||
WholeMatch = 2 | ||
} | ||
@@ -731,4 +740,12 @@ type ScanOptions = { | ||
lines: string[]; | ||
toString(): string; | ||
asString(): string; | ||
} | ||
/** | ||
* トレース実行 | ||
* | ||
* @param source | ||
* @param ruleOrParser | ||
* @param options | ||
* @returns | ||
*/ | ||
function trace<V>(source: Source, ruleOrParser: string | Parser<V>, options?: Partial<ScanOptions & TraceOptions>): TraceResult; | ||
@@ -741,2 +758,4 @@ } | ||
* SyntaxHighlightで使うことを想定している。 | ||
* 現状、'?'パーサーを使った場合、前置空白がデータに残らないが、 | ||
* フラット化した後にTokenのposが連続していないことを検知することで、補完データを差し込むことができる。 | ||
* | ||
@@ -743,0 +762,0 @@ * @param cluster Syntaxツリー |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
130960
2763