@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.
Files changed (53) hide show
  1. package/dist/cli/cli.js +541 -1125
  2. package/dist/cli/src/Lits/Lits.d.ts +1 -6
  3. package/dist/cli/src/index.d.ts +3 -8
  4. package/dist/cli/src/tokenizer/tokenizers.d.ts +1 -0
  5. package/dist/index.esm.js +18 -7432
  6. package/dist/index.esm.js.map +1 -1
  7. package/dist/index.js +17 -7442
  8. package/dist/index.js.map +1 -1
  9. package/dist/lits.iife.js +17 -7442
  10. package/dist/lits.iife.js.map +1 -1
  11. package/dist/src/Lits/Lits.d.ts +1 -6
  12. package/dist/src/index.d.ts +3 -8
  13. package/dist/src/tokenizer/tokenizers.d.ts +1 -0
  14. package/dist/testFramework.esm.js +3 -586
  15. package/dist/testFramework.esm.js.map +1 -1
  16. package/dist/testFramework.js +3 -586
  17. package/dist/testFramework.js.map +1 -1
  18. package/package.json +1 -1
  19. package/dist/cli/src/identifier.d.ts +0 -2
  20. package/dist/cli/src/transformer/index.d.ts +0 -2
  21. package/dist/cli/src/unparser/UnparseOptions.d.ts +0 -15
  22. package/dist/cli/src/unparser/unparse.d.ts +0 -5
  23. package/dist/cli/src/unparser/unparseArrayLiteral.d.ts +0 -3
  24. package/dist/cli/src/unparser/unparseBindings.d.ts +0 -3
  25. package/dist/cli/src/unparser/unparseNormalExpression.d.ts +0 -3
  26. package/dist/cli/src/unparser/unparseObjectLiteral.d.ts +0 -3
  27. package/dist/cli/src/unparser/unparseParams.d.ts +0 -17
  28. package/dist/cli/src/unparser/unparseSpecialExpression/index.d.ts +0 -3
  29. package/dist/cli/src/unparser/unparseSpecialExpression/unparseCond.d.ts +0 -3
  30. package/dist/cli/src/unparser/unparseSpecialExpression/unparseDo.d.ts +0 -3
  31. package/dist/cli/src/unparser/unparseSpecialExpression/unparseIfLet.d.ts +0 -3
  32. package/dist/cli/src/unparser/unparseSpecialExpression/unparseIfOrWhenLike.d.ts +0 -6
  33. package/dist/cli/src/unparser/unparseSpecialExpression/unparseLet.d.ts +0 -3
  34. package/dist/cli/src/unparser/utils.d.ts +0 -5
  35. package/dist/cli/src/untokenizer/index.d.ts +0 -2
  36. package/dist/src/identifier.d.ts +0 -2
  37. package/dist/src/transformer/index.d.ts +0 -2
  38. package/dist/src/unparser/UnparseOptions.d.ts +0 -15
  39. package/dist/src/unparser/__tests__/testFormatter.d.ts +0 -1
  40. package/dist/src/unparser/unparse.d.ts +0 -5
  41. package/dist/src/unparser/unparseArrayLiteral.d.ts +0 -3
  42. package/dist/src/unparser/unparseBindings.d.ts +0 -3
  43. package/dist/src/unparser/unparseNormalExpression.d.ts +0 -3
  44. package/dist/src/unparser/unparseObjectLiteral.d.ts +0 -3
  45. package/dist/src/unparser/unparseParams.d.ts +0 -17
  46. package/dist/src/unparser/unparseSpecialExpression/index.d.ts +0 -3
  47. package/dist/src/unparser/unparseSpecialExpression/unparseCond.d.ts +0 -3
  48. package/dist/src/unparser/unparseSpecialExpression/unparseDo.d.ts +0 -3
  49. package/dist/src/unparser/unparseSpecialExpression/unparseIfLet.d.ts +0 -3
  50. package/dist/src/unparser/unparseSpecialExpression/unparseIfOrWhenLike.d.ts +0 -6
  51. package/dist/src/unparser/unparseSpecialExpression/unparseLet.d.ts +0 -3
  52. package/dist/src/unparser/utils.d.ts +0 -5
  53. package/dist/src/untokenizer/index.d.ts +0 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mojir/lits",
3
- "version": "1.2.2-alpha.7",
3
+ "version": "1.3.0",
4
4
  "description": "Lits is a Lisp dialect implemented in TypeScript",
5
5
  "author": "Albert Mojir",
6
6
  "license": "MIT",
@@ -1,2 +0,0 @@
1
- export declare const identifierCharacterClass = "[\\w@%^?=!$<>+*/:-]";
2
- export declare const identifierFirstCharacterClass = "[a-zA-Z_@%^?=!$<>+*/-]";
@@ -1,2 +0,0 @@
1
- import type { TokenStream } from '../tokenizer/interface';
2
- export declare function transformTokens(tokenStram: TokenStream, transformer: (name: string) => string): TokenStream;
@@ -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,3 +0,0 @@
1
- import type { NormalExpressionNode } from '../parser/interface';
2
- import type { UnparseOptions } from './UnparseOptions';
3
- export declare function unparseArrayLiteral(node: NormalExpressionNode, options: UnparseOptions): string;
@@ -1,3 +0,0 @@
1
- import type { NormalExpressionNode } from '../parser/interface';
2
- import type { UnparseOptions } from './UnparseOptions';
3
- export declare function unparseBindings(node: NormalExpressionNode, options: UnparseOptions): string;
@@ -1,3 +0,0 @@
1
- import type { UnparseOptions } from './UnparseOptions';
2
- import type { ExpressionWithParamsNode } from './unparse';
3
- export declare function unparseNormalExpression(node: ExpressionWithParamsNode, options: UnparseOptions): string;
@@ -1,3 +0,0 @@
1
- import type { NormalExpressionNode } from '../parser/interface';
2
- import type { UnparseOptions } from './UnparseOptions';
3
- export declare function unparseObjectLiteral(node: NormalExpressionNode, options: UnparseOptions): 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,3 +0,0 @@
1
- import type { SpecialExpressionNode } from '../../builtin';
2
- import type { UnparseOptions } from '../UnparseOptions';
3
- export declare function unparseSpecialExpression(node: SpecialExpressionNode, options: UnparseOptions): string;
@@ -1,3 +0,0 @@
1
- import type { CondNode } from '../../builtin/specialExpressions/cond';
2
- import type { UnparseOptions } from '../UnparseOptions';
3
- export declare function unparseCond(node: CondNode, options: UnparseOptions): string;
@@ -1,3 +0,0 @@
1
- import type { DoNode } from '../../builtin/specialExpressions/do';
2
- import type { UnparseOptions } from '../UnparseOptions';
3
- export declare function unparseDo(node: DoNode, options: UnparseOptions): string;
@@ -1,3 +0,0 @@
1
- import type { IfLetNode } from '../../builtin/specialExpressions/if-let';
2
- import type { UnparseOptions } from '../UnparseOptions';
3
- export declare function unparseIfLet(node: IfLetNode, 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,3 +0,0 @@
1
- import type { LetNode } from '../../builtin/specialExpressions/let';
2
- import type { UnparseOptions } from '../UnparseOptions';
3
- export declare function unparseLet(node: LetNode, 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;
@@ -1,2 +0,0 @@
1
- import type { TokenStream } from '../tokenizer/interface';
2
- export declare function untokenize(tokenStream: TokenStream): string;
@@ -1,2 +0,0 @@
1
- export declare const identifierCharacterClass = "[\\w@%^?=!$<>+*/:-]";
2
- export declare const identifierFirstCharacterClass = "[a-zA-Z_@%^?=!$<>+*/-]";
@@ -1,2 +0,0 @@
1
- import type { TokenStream } from '../tokenizer/interface';
2
- export declare function transformTokens(tokenStram: TokenStream, transformer: (name: string) => string): TokenStream;
@@ -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,3 +0,0 @@
1
- import type { NormalExpressionNode } from '../parser/interface';
2
- import type { UnparseOptions } from './UnparseOptions';
3
- export declare function unparseArrayLiteral(node: NormalExpressionNode, options: UnparseOptions): string;
@@ -1,3 +0,0 @@
1
- import type { NormalExpressionNode } from '../parser/interface';
2
- import type { UnparseOptions } from './UnparseOptions';
3
- export declare function unparseBindings(node: NormalExpressionNode, options: UnparseOptions): string;
@@ -1,3 +0,0 @@
1
- import type { UnparseOptions } from './UnparseOptions';
2
- import type { ExpressionWithParamsNode } from './unparse';
3
- export declare function unparseNormalExpression(node: ExpressionWithParamsNode, options: UnparseOptions): string;
@@ -1,3 +0,0 @@
1
- import type { NormalExpressionNode } from '../parser/interface';
2
- import type { UnparseOptions } from './UnparseOptions';
3
- export declare function unparseObjectLiteral(node: NormalExpressionNode, options: UnparseOptions): 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,3 +0,0 @@
1
- import type { SpecialExpressionNode } from '../../builtin';
2
- import type { UnparseOptions } from '../UnparseOptions';
3
- export declare function unparseSpecialExpression(node: SpecialExpressionNode, options: UnparseOptions): string;
@@ -1,3 +0,0 @@
1
- import type { CondNode } from '../../builtin/specialExpressions/cond';
2
- import type { UnparseOptions } from '../UnparseOptions';
3
- export declare function unparseCond(node: CondNode, options: UnparseOptions): string;
@@ -1,3 +0,0 @@
1
- import type { DoNode } from '../../builtin/specialExpressions/do';
2
- import type { UnparseOptions } from '../UnparseOptions';
3
- export declare function unparseDo(node: DoNode, options: UnparseOptions): string;
@@ -1,3 +0,0 @@
1
- import type { IfLetNode } from '../../builtin/specialExpressions/if-let';
2
- import type { UnparseOptions } from '../UnparseOptions';
3
- export declare function unparseIfLet(node: IfLetNode, 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,3 +0,0 @@
1
- import type { LetNode } from '../../builtin/specialExpressions/let';
2
- import type { UnparseOptions } from '../UnparseOptions';
3
- export declare function unparseLet(node: LetNode, 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;
@@ -1,2 +0,0 @@
1
- import type { TokenStream } from '../tokenizer/interface';
2
- export declare function untokenize(tokenStream: TokenStream): string;