@mojir/lits 1.2.2-alpha.7 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/cli.js +541 -1125
- package/dist/cli/src/Lits/Lits.d.ts +1 -6
- package/dist/cli/src/index.d.ts +3 -8
- package/dist/cli/src/tokenizer/tokenizers.d.ts +1 -0
- package/dist/index.esm.js +18 -7432
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +17 -7442
- package/dist/index.js.map +1 -1
- package/dist/lits.iife.js +17 -7442
- package/dist/lits.iife.js.map +1 -1
- package/dist/src/Lits/Lits.d.ts +1 -6
- package/dist/src/index.d.ts +3 -8
- package/dist/src/tokenizer/tokenizers.d.ts +1 -0
- package/dist/testFramework.esm.js +3 -586
- package/dist/testFramework.esm.js.map +1 -1
- package/dist/testFramework.js +3 -586
- package/dist/testFramework.js.map +1 -1
- package/package.json +1 -1
- package/dist/cli/src/identifier.d.ts +0 -2
- package/dist/cli/src/transformer/index.d.ts +0 -2
- package/dist/cli/src/unparser/UnparseOptions.d.ts +0 -15
- package/dist/cli/src/unparser/unparse.d.ts +0 -5
- package/dist/cli/src/unparser/unparseArrayLiteral.d.ts +0 -3
- package/dist/cli/src/unparser/unparseBindings.d.ts +0 -3
- package/dist/cli/src/unparser/unparseNormalExpression.d.ts +0 -3
- package/dist/cli/src/unparser/unparseObjectLiteral.d.ts +0 -3
- package/dist/cli/src/unparser/unparseParams.d.ts +0 -17
- package/dist/cli/src/unparser/unparseSpecialExpression/index.d.ts +0 -3
- package/dist/cli/src/unparser/unparseSpecialExpression/unparseCond.d.ts +0 -3
- package/dist/cli/src/unparser/unparseSpecialExpression/unparseDo.d.ts +0 -3
- package/dist/cli/src/unparser/unparseSpecialExpression/unparseIfLet.d.ts +0 -3
- package/dist/cli/src/unparser/unparseSpecialExpression/unparseIfOrWhenLike.d.ts +0 -6
- package/dist/cli/src/unparser/unparseSpecialExpression/unparseLet.d.ts +0 -3
- package/dist/cli/src/unparser/utils.d.ts +0 -5
- package/dist/cli/src/untokenizer/index.d.ts +0 -2
- package/dist/src/identifier.d.ts +0 -2
- package/dist/src/transformer/index.d.ts +0 -2
- package/dist/src/unparser/UnparseOptions.d.ts +0 -15
- package/dist/src/unparser/__tests__/testFormatter.d.ts +0 -1
- package/dist/src/unparser/unparse.d.ts +0 -5
- package/dist/src/unparser/unparseArrayLiteral.d.ts +0 -3
- package/dist/src/unparser/unparseBindings.d.ts +0 -3
- package/dist/src/unparser/unparseNormalExpression.d.ts +0 -3
- package/dist/src/unparser/unparseObjectLiteral.d.ts +0 -3
- package/dist/src/unparser/unparseParams.d.ts +0 -17
- package/dist/src/unparser/unparseSpecialExpression/index.d.ts +0 -3
- package/dist/src/unparser/unparseSpecialExpression/unparseCond.d.ts +0 -3
- package/dist/src/unparser/unparseSpecialExpression/unparseDo.d.ts +0 -3
- package/dist/src/unparser/unparseSpecialExpression/unparseIfLet.d.ts +0 -3
- package/dist/src/unparser/unparseSpecialExpression/unparseIfOrWhenLike.d.ts +0 -6
- package/dist/src/unparser/unparseSpecialExpression/unparseLet.d.ts +0 -3
- package/dist/src/unparser/utils.d.ts +0 -5
- package/dist/src/untokenizer/index.d.ts +0 -2
package/package.json
CHANGED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { Unparse } from './unparse';
|
|
2
|
-
export declare class UnparseOptions {
|
|
3
|
-
readonly unparse: Unparse;
|
|
4
|
-
readonly lineLength: number;
|
|
5
|
-
readonly col: number;
|
|
6
|
-
readonly inlined: boolean;
|
|
7
|
-
readonly locked: boolean;
|
|
8
|
-
readonly indent: string;
|
|
9
|
-
constructor(unparse: Unparse, lineLength: number, col?: number, inlined?: boolean, locked?: boolean);
|
|
10
|
-
inc(count?: number): UnparseOptions;
|
|
11
|
-
inline(): UnparseOptions;
|
|
12
|
-
noInline(): UnparseOptions;
|
|
13
|
-
lock(): UnparseOptions;
|
|
14
|
-
assertNotOverflown(value: string): string;
|
|
15
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { Ast, AstNode, NormalExpressionNode } from '../parser/interface';
|
|
2
|
-
import { UnparseOptions } from './UnparseOptions';
|
|
3
|
-
export type ExpressionWithParamsNode = Pick<NormalExpressionNode, 'debugData' | 'n' | 'p'>;
|
|
4
|
-
export type Unparse = (node: AstNode, options: UnparseOptions) => string;
|
|
5
|
-
export declare function unparseAst(ast: Ast, lineLength: number): string;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { AstNode } from '../parser/interface';
|
|
2
|
-
import type { UnparseOptions } from './UnparseOptions';
|
|
3
|
-
export declare function unparseParams({ params, options, prefix, inline, endBracket, body, name, noMultilineInline, pairs, }: {
|
|
4
|
-
params: AstNode[];
|
|
5
|
-
prefix: string;
|
|
6
|
-
inline: boolean;
|
|
7
|
-
endBracket: string;
|
|
8
|
-
options: UnparseOptions;
|
|
9
|
-
body?: boolean;
|
|
10
|
-
name?: string;
|
|
11
|
-
noMultilineInline?: boolean;
|
|
12
|
-
pairs?: boolean;
|
|
13
|
-
}): string;
|
|
14
|
-
export declare function unparseSingleLineParams(params: AstNode[], options: UnparseOptions): string;
|
|
15
|
-
export declare function unparseSingleLinePairs(params: AstNode[], options: UnparseOptions): string;
|
|
16
|
-
export declare function unparseMultilineParams(params: AstNode[], options: UnparseOptions): string;
|
|
17
|
-
export declare function unparseMultilinePairwise(params: AstNode[], options: UnparseOptions): string;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { IfNode } from '../../builtin/specialExpressions/if';
|
|
2
|
-
import type { IfNotNode } from '../../builtin/specialExpressions/if-not';
|
|
3
|
-
import type { WhenNode } from '../../builtin/specialExpressions/when';
|
|
4
|
-
import type { WhenNotNode } from '../../builtin/specialExpressions/when-not';
|
|
5
|
-
import type { UnparseOptions } from '../UnparseOptions';
|
|
6
|
-
export declare function unparseIfOrWhenLike(node: WhenNode | WhenNotNode | IfNode | IfNotNode, options: UnparseOptions): string;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { MetaTokens } from '../tokenizer/interface';
|
|
2
|
-
import type { UnparseOptions } from './UnparseOptions';
|
|
3
|
-
export declare function ensureNewlineSeparator(a: string, b: string): string;
|
|
4
|
-
export declare function ensureSpaceSeparator(a: string, b: string): string;
|
|
5
|
-
export declare function applyMetaTokens(value: string | number, metaTokens: MetaTokens | undefined, options: UnparseOptions): string;
|
package/dist/src/identifier.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { Unparse } from './unparse';
|
|
2
|
-
export declare class UnparseOptions {
|
|
3
|
-
readonly unparse: Unparse;
|
|
4
|
-
readonly lineLength: number;
|
|
5
|
-
readonly col: number;
|
|
6
|
-
readonly inlined: boolean;
|
|
7
|
-
readonly locked: boolean;
|
|
8
|
-
readonly indent: string;
|
|
9
|
-
constructor(unparse: Unparse, lineLength: number, col?: number, inlined?: boolean, locked?: boolean);
|
|
10
|
-
inc(count?: number): UnparseOptions;
|
|
11
|
-
inline(): UnparseOptions;
|
|
12
|
-
noInline(): UnparseOptions;
|
|
13
|
-
lock(): UnparseOptions;
|
|
14
|
-
assertNotOverflown(value: string): string;
|
|
15
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function testFormatter(formatter: (program: string) => string, program: string, expected: string): void;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { Ast, AstNode, NormalExpressionNode } from '../parser/interface';
|
|
2
|
-
import { UnparseOptions } from './UnparseOptions';
|
|
3
|
-
export type ExpressionWithParamsNode = Pick<NormalExpressionNode, 'debugData' | 'n' | 'p'>;
|
|
4
|
-
export type Unparse = (node: AstNode, options: UnparseOptions) => string;
|
|
5
|
-
export declare function unparseAst(ast: Ast, lineLength: number): string;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { AstNode } from '../parser/interface';
|
|
2
|
-
import type { UnparseOptions } from './UnparseOptions';
|
|
3
|
-
export declare function unparseParams({ params, options, prefix, inline, endBracket, body, name, noMultilineInline, pairs, }: {
|
|
4
|
-
params: AstNode[];
|
|
5
|
-
prefix: string;
|
|
6
|
-
inline: boolean;
|
|
7
|
-
endBracket: string;
|
|
8
|
-
options: UnparseOptions;
|
|
9
|
-
body?: boolean;
|
|
10
|
-
name?: string;
|
|
11
|
-
noMultilineInline?: boolean;
|
|
12
|
-
pairs?: boolean;
|
|
13
|
-
}): string;
|
|
14
|
-
export declare function unparseSingleLineParams(params: AstNode[], options: UnparseOptions): string;
|
|
15
|
-
export declare function unparseSingleLinePairs(params: AstNode[], options: UnparseOptions): string;
|
|
16
|
-
export declare function unparseMultilineParams(params: AstNode[], options: UnparseOptions): string;
|
|
17
|
-
export declare function unparseMultilinePairwise(params: AstNode[], options: UnparseOptions): string;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { IfNode } from '../../builtin/specialExpressions/if';
|
|
2
|
-
import type { IfNotNode } from '../../builtin/specialExpressions/if-not';
|
|
3
|
-
import type { WhenNode } from '../../builtin/specialExpressions/when';
|
|
4
|
-
import type { WhenNotNode } from '../../builtin/specialExpressions/when-not';
|
|
5
|
-
import type { UnparseOptions } from '../UnparseOptions';
|
|
6
|
-
export declare function unparseIfOrWhenLike(node: WhenNode | WhenNotNode | IfNode | IfNotNode, options: UnparseOptions): string;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { MetaTokens } from '../tokenizer/interface';
|
|
2
|
-
import type { UnparseOptions } from './UnparseOptions';
|
|
3
|
-
export declare function ensureNewlineSeparator(a: string, b: string): string;
|
|
4
|
-
export declare function ensureSpaceSeparator(a: string, b: string): string;
|
|
5
|
-
export declare function applyMetaTokens(value: string | number, metaTokens: MetaTokens | undefined, options: UnparseOptions): string;
|