bit2 0.1.0 → 0.1.1

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.
@@ -1,4 +1,4 @@
1
- export type Expr = Constant | Variable | BinaryOperation | UnaryOperation | FieldAccess | ArrayLiteral | FreezeExp | ObjectLiteral;
1
+ export declare type Expr = Constant | Variable | BinaryOperation | UnaryOperation | FieldAccess | ArrayLiteral | FreezeExp | ObjectLiteral;
2
2
  export interface Constant {
3
3
  type: 'constant';
4
4
  value: number | boolean | string | [] | null | ObjectLiteral | ObjectLiteral[];
@@ -42,8 +42,8 @@ export interface FunctionCall {
42
42
  func: Expr;
43
43
  args: Expr[];
44
44
  }
45
- export type BinaryOperator = '+' | '-' | '*' | '/' | '&&' | '||' | '>' | '<' | '>=' | '<=' | '!=' | '==';
46
- export type UnaryOperator = 'not';
45
+ export declare type BinaryOperator = '+' | '-' | '*' | '/' | '&&' | '||' | '>' | '<' | '>=' | '<=' | '!=' | '==';
46
+ export declare type UnaryOperator = 'not';
47
47
  export declare function findVariablesAndFields(exp: Expr): {
48
48
  variables: Variable[];
49
49
  fields: {
@@ -1,5 +1,5 @@
1
1
  import { Expr, Variable } from "../common/Exp";
2
- export type TermNode = ConstNode | SpaceNode | DeclareNode | DeclareendNode | AssignNode | ExpNode | SeqNode | IfThenElseNode | LoopNode | CallNode | NopNode | BotNode | EndNode | LambdaWithExpr | SepNode;
2
+ export declare type TermNode = ConstNode | SpaceNode | DeclareNode | DeclareendNode | AssignNode | ExpNode | SeqNode | IfThenElseNode | LoopNode | CallNode | NopNode | BotNode | EndNode | LambdaWithExpr | SepNode;
3
3
  export interface ConstNode {
4
4
  type: 'const';
5
5
  value: string;
@@ -1,4 +1,4 @@
1
- export type UpdateOperation = {
1
+ export declare type UpdateOperation = {
2
2
  type: 'insert';
3
3
  str: string;
4
4
  position: number;
@@ -1,7 +1,7 @@
1
1
  import * as PartilAST from "../partial/AST";
2
2
  import { Variable } from "../common/Exp";
3
3
  import * as CoreAST from "../core/AST";
4
- export type TermNode = PartilAST.ConstNode | PartilAST.SpaceNode | CoreAST.DeclareendNode | CoreAST.SepNode | PartilAST.ExpNode | SeqNode | LambdaAppNode | PartilAST.BranchStartNode | PartilAST.BranchEndNode | PartilAST.LoopFrontNode | PartilAST.LoopRearNode | PartilAST.EndNode | PartilAST.NopNode | PartilAST.BotNode | PartilAST.CallStartNode | PartilAST.CallEndNode;
4
+ export declare type TermNode = PartilAST.ConstNode | PartilAST.SpaceNode | CoreAST.DeclareendNode | CoreAST.SepNode | PartilAST.ExpNode | SeqNode | LambdaAppNode | PartilAST.BranchStartNode | PartilAST.BranchEndNode | PartilAST.LoopFrontNode | PartilAST.LoopRearNode | PartilAST.EndNode | PartilAST.NopNode | PartilAST.BotNode | PartilAST.CallStartNode | PartilAST.CallEndNode;
5
5
  export interface SeqNode {
6
6
  type: 'seq';
7
7
  nodes: TermNode[];
@@ -13,7 +13,7 @@ export interface LambdaAppNode {
13
13
  binding: PartilAST.Binding;
14
14
  marker: Marker;
15
15
  }
16
- type Marker = PartilAST.LoopItemMarker | DeclareMarker | AssignMarker;
16
+ declare type Marker = PartilAST.LoopItemMarker | DeclareMarker | AssignMarker;
17
17
  export interface DeclareMarker {
18
18
  type: 'declare';
19
19
  }
@@ -1,6 +1,6 @@
1
1
  import * as CoreAST from "../core/AST";
2
2
  import { Expr, Variable } from "../common/Exp";
3
- export type TermNode = ConstNode | SpaceNode | DeclareNode | CoreAST.DeclareendNode | AssignNode | ExpNode | NopNode | SeqNode | BranchStartNode | BranchEndNode | CoreAST.SepNode | LambdaAppNode | LoopFrontNode | LoopRearNode | EndNode | BotNode | CallStartNode | CallEndNode;
3
+ export declare type TermNode = ConstNode | SpaceNode | DeclareNode | CoreAST.DeclareendNode | AssignNode | ExpNode | NopNode | SeqNode | BranchStartNode | BranchEndNode | CoreAST.SepNode | LambdaAppNode | LoopFrontNode | LoopRearNode | EndNode | BotNode | CallStartNode | CallEndNode;
4
4
  export interface ConstNode {
5
5
  type: 'const';
6
6
  value: string;
@@ -47,7 +47,7 @@ export interface LambdaAppNode {
47
47
  binding: Binding;
48
48
  marker: Marker;
49
49
  }
50
- export type Marker = LoopItemMarker;
50
+ export declare type Marker = LoopItemMarker;
51
51
  export interface LoopItemMarker {
52
52
  type: 'loopitem';
53
53
  lst: Expr;
@@ -77,8 +77,8 @@ export interface CallStartNode {
77
77
  export interface CallEndNode {
78
78
  type: 'callend';
79
79
  }
80
- export type Binding = [Expr, Value];
81
- export type Value = number | boolean | string | null | ObjectValue | Value[];
80
+ export declare type Binding = [Expr, Value];
81
+ export declare type Value = number | boolean | string | null | ObjectValue | Value[];
82
82
  export interface ObjectValue {
83
83
  type: 'object';
84
84
  fields: {
@@ -1,7 +1,7 @@
1
1
  import { Expr } from "../common/Exp";
2
- export type Name = string;
3
- export type Literal = string;
4
- export type Fragment = Literal | Directive | FragmentList;
2
+ export declare type Name = string;
3
+ export declare type Literal = string;
4
+ export declare type Fragment = Literal | Directive | FragmentList;
5
5
  export interface Directive {
6
6
  type: 'Directive';
7
7
  content: DeclareDirective | AssignDirective | ExprDirective | IfDirective | ForDirective;
@@ -26,7 +26,7 @@ export interface IfDirective {
26
26
  thenBranch: Fragment;
27
27
  elseBranch: ElseBranch;
28
28
  }
29
- export type ElseBranch = IfDirective | Fragment | Bot;
29
+ export declare type ElseBranch = IfDirective | Fragment | Bot;
30
30
  export interface Bot {
31
31
  type: 'bot';
32
32
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bit2",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "main": "dist/bit2.js",
5
5
  "types": "dist/bit2.d.ts",
6
6
  "dependencies": {
@@ -53,7 +53,8 @@
53
53
  "example.small.9": "node dist/test/examples/small.9.test.js",
54
54
  "example.small.10": "node dist/test/examples/small.10.test.js",
55
55
  "example.small.13": "node dist/test/examples/small.13.test.js",
56
- "example.small.17": "node dist/test/examples/small.17.test.js"
56
+ "example.small.17": "node dist/test/examples/small.17.test.js",
57
+ "example.test": "node dist/test/examples/Test.test.js"
57
58
  },
58
59
  "files": [
59
60
  "dist/bit2.js",