mirror of
https://github.com/larvit/adf-codec.git
synced 2026-11-19 06:35:44 +01:00
Give the directive grammar, flavours and reader failures one place each
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
import type { AttributeKind, VocabularyPair, VocabularyValue } from '../adf/attribute-vocabulary.ts'
|
||||
import type { CodeSpanCloser } from './commonmark/backtick-runs.ts'
|
||||
import type { ConvertFault } from '../result.ts'
|
||||
import type { InlineSource } from './inline-tokens.ts'
|
||||
import type { JsonValue } from '../json-value.ts'
|
||||
import { backslashEscape, holdsNullCharacter } from './commonmark/grammar.ts'
|
||||
import { backtickRun } from './commonmark/backtick-runs.ts'
|
||||
import { isNumberList } from '../adf/attribute-vocabulary.ts'
|
||||
import { overNested } from '../json-value.ts'
|
||||
import { largestNesting } from '../nesting.ts'
|
||||
import { parseJsonText } from '../json-text.ts'
|
||||
import { serializeCanonicalJson } from '../canonical-json.ts'
|
||||
import type { AttributeKind, VocabularyPair, VocabularyValue } from '../../adf/attribute-vocabulary.ts'
|
||||
import type { CodeSpanCloser } from '../commonmark/backtick-runs.ts'
|
||||
import type { ConvertFault, Read } from '../../result.ts'
|
||||
import type { InlineSource } from '../inline-tokens.ts'
|
||||
import type { JsonValue } from '../../json-value.ts'
|
||||
import { backslashEscape, holdsNullCharacter } from '../commonmark/grammar.ts'
|
||||
import { backtickRun } from '../commonmark/backtick-runs.ts'
|
||||
import { isNumberList } from '../../adf/attribute-vocabulary.ts'
|
||||
import { overNested } from '../../json-value.ts'
|
||||
import { largestNesting } from '../../nesting.ts'
|
||||
import { parseJsonText } from '../../json-text.ts'
|
||||
import { serializeCanonicalJson } from '../../canonical-json.ts'
|
||||
|
||||
export type AttributeReading = { refusal: 'kind' | 'nesting'; value?: undefined } | { refusal?: undefined; value: VocabularyValue }
|
||||
|
||||
@@ -31,8 +31,6 @@ export type DirectiveSpan = { attributes: DirectiveAttributes; content: string |
|
||||
|
||||
export type NestedSpans = ReadonlyMap<number, DirectiveSpan>
|
||||
|
||||
export type Read<T> = { fault: ConvertFault; value?: undefined } | { fault?: undefined; value: T }
|
||||
|
||||
type AttributePair = { end: number; key: string; value: DirectiveValue }
|
||||
|
||||
type Content = { content: string | undefined; end: number; spans: NestedSpans }
|
||||
|
||||
Reference in New Issue
Block a user