astrocite-bibtex
Advanced tools
Comparing version 0.15.0 to 0.15.1
@@ -12,3 +12,3 @@ interface LocationInfo { | ||
interface TextValue { | ||
export interface TextValue { | ||
kind: 'Text'; | ||
@@ -19,3 +19,3 @@ loc: Location; | ||
interface StringValue { | ||
export interface StringValue { | ||
kind: 'String'; | ||
@@ -26,3 +26,3 @@ loc: Location; | ||
interface NumberValue { | ||
export interface NumberValue { | ||
kind: 'Number'; | ||
@@ -33,3 +33,3 @@ loc: Location; | ||
interface RequiredArgument { | ||
export interface RequiredArgument { | ||
kind: 'RequiredArgument'; | ||
@@ -40,3 +40,3 @@ loc: Location; | ||
interface OptionalArgument { | ||
export interface OptionalArgument { | ||
kind: 'OptionalArgument'; | ||
@@ -47,5 +47,5 @@ loc: Location; | ||
type Argument = RequiredArgument | OptionalArgument; | ||
export type Argument = RequiredArgument | OptionalArgument; | ||
interface RegularCommand { | ||
export interface RegularCommand { | ||
kind: 'RegularCommand'; | ||
@@ -57,3 +57,17 @@ loc: Location; | ||
interface SymbolCommand { | ||
export interface SubscriptCommand { | ||
kind: 'SubscriptCommand'; | ||
loc: Location; | ||
value: string; | ||
arguments: ValueType; | ||
} | ||
export interface SuperscriptCommand { | ||
kind: 'SuperscriptCommand'; | ||
loc: Location; | ||
value: string; | ||
arguments: ValueType; | ||
} | ||
export interface SymbolCommand { | ||
kind: 'SymbolCommand'; | ||
@@ -64,3 +78,8 @@ loc: Location; | ||
interface DicraticalCommand { | ||
export interface MathMode { | ||
kind: 'MathMode'; | ||
loc: Location; | ||
} | ||
export interface DicraticalCommand { | ||
kind: 'DicraticalCommand'; | ||
@@ -70,5 +89,6 @@ loc: Location; | ||
character: string; | ||
dotless: boolean; | ||
} | ||
interface NestedLiteral { | ||
export interface NestedLiteral { | ||
kind: 'NestedLiteral'; | ||
@@ -79,3 +99,3 @@ loc: Location; | ||
interface Property { | ||
export interface Property { | ||
kind: 'Property'; | ||
@@ -95,3 +115,3 @@ loc: Location; | ||
interface PreambleExpression { | ||
export interface PreambleExpression { | ||
kind: 'PreambleExpression'; | ||
@@ -102,3 +122,3 @@ loc: Location; | ||
interface StringExpression { | ||
export interface StringExpression { | ||
kind: 'StringExpression'; | ||
@@ -110,9 +130,42 @@ loc: Location; | ||
type Command = RegularCommand | SymbolCommand | DicraticalCommand; | ||
export interface BracedComment { | ||
kind: 'BracedComment'; | ||
loc: Location; | ||
value: string; | ||
} | ||
export type ValueType = TextValue | StringValue | NestedLiteral | NumberValue | Command; | ||
export interface LineComment { | ||
kind: 'LineComment'; | ||
loc: Location; | ||
value: string; | ||
} | ||
type Children = Entry | PreambleExpression | StringExpression; | ||
export interface NonEntryText { | ||
kind: 'NonEntryText'; | ||
loc: Location; | ||
value: string; | ||
} | ||
interface AST { | ||
export type Comment = BracedComment | LineComment | NonEntryText; | ||
export type Command = | ||
| RegularCommand | ||
| SymbolCommand | ||
| DicraticalCommand | ||
| SubscriptCommand | ||
| SuperscriptCommand | ||
| MathMode; | ||
export type ValueType = | ||
| TextValue | ||
| StringValue | ||
| NestedLiteral | ||
| NumberValue | ||
| Command; | ||
export type Children = Entry | PreambleExpression | StringExpression | Comment; | ||
export type Node = Comment | PreambleExpression | StringExpression | Entry; | ||
export interface AST { | ||
kind: 'File'; | ||
@@ -123,6 +176,7 @@ loc: Location; | ||
export namespace AST { | ||
function parse(input: string): AST; | ||
} | ||
export type ParseOptions = { | ||
verbatimProperties?: string[]; | ||
verbatimCommands?: string[]; | ||
}; | ||
export function parse(input: string): any; | ||
export declare function parse(input: string, options?: ParseOptions): AST; |
{ | ||
"name": "astrocite-bibtex", | ||
"version": "0.15.0", | ||
"version": "0.15.1", | ||
"description": "Parser and AST for converting BibTeX to CSL JSON", | ||
@@ -10,3 +10,3 @@ "license": "MIT", | ||
"scripts": { | ||
"build": "rm -rf lib/* && pegjs -o src/grammar.js src/grammar.pegjs && tsc -p ." | ||
"build": "rm -rf lib/* && pegjs -o src/grammar.js src/grammar.pegjs && tsc -p . && cp src/schema.d.ts lib/grammar.d.ts && cp src/schema.d.ts index.d.ts" | ||
}, | ||
@@ -28,3 +28,3 @@ "files": [ | ||
}, | ||
"gitHead": "3d317e74968eb7fa7fb0bca87f45a066800729ae" | ||
"gitHead": "e7f336fbdaad9d19bab1c6e7814bae27e090c293" | ||
} |
156566
9
4037