@lcap/nasl 3.3.3-beta.6 → 3.3.3-beta.7
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/out/bak/translator.js +73 -15
- package/out/bak/translator.js.map +1 -1
- package/out/common/BaseNode.d.ts +11 -0
- package/out/common/BaseNode.js +51 -0
- package/out/common/BaseNode.js.map +1 -1
- package/out/common/index.d.ts +1 -0
- package/out/common/index.js +1 -0
- package/out/common/index.js.map +1 -1
- package/out/common/utils.d.ts +2 -0
- package/out/common/utils.js +18 -0
- package/out/common/utils.js.map +1 -0
- package/out/concepts/Abort__.d.ts +2 -2
- package/out/concepts/Abort__.js +6 -2
- package/out/concepts/Abort__.js.map +1 -1
- package/out/concepts/Anchor__.d.ts +2 -2
- package/out/concepts/Anchor__.js +11 -7
- package/out/concepts/Anchor__.js.map +1 -1
- package/out/concepts/AnonymousFunction__.d.ts +3 -3
- package/out/concepts/AnonymousFunction__.js +37 -23
- package/out/concepts/AnonymousFunction__.js.map +1 -1
- package/out/concepts/App__.js +137 -69
- package/out/concepts/App__.js.map +1 -1
- package/out/concepts/Argument__.d.ts +2 -2
- package/out/concepts/Argument__.js +18 -13
- package/out/concepts/Argument__.js.map +1 -1
- package/out/concepts/Assignee__.d.ts +2 -2
- package/out/concepts/Assignee__.js +31 -19
- package/out/concepts/Assignee__.js.map +1 -1
- package/out/concepts/AssignmentLine__.d.ts +2 -2
- package/out/concepts/AssignmentLine__.js +3 -2
- package/out/concepts/AssignmentLine__.js.map +1 -1
- package/out/concepts/Assignment__.d.ts +2 -2
- package/out/concepts/Assignment__.js +16 -12
- package/out/concepts/Assignment__.js.map +1 -1
- package/out/concepts/Attribute__.js +6 -3
- package/out/concepts/Attribute__.js.map +1 -1
- package/out/concepts/AuthLogicForCallInterface__.d.ts +2 -2
- package/out/concepts/AuthLogicForCallInterface__.js +62 -78
- package/out/concepts/AuthLogicForCallInterface__.js.map +1 -1
- package/out/concepts/BackendVariable__.d.ts +5 -8
- package/out/concepts/BackendVariable__.js +23 -18
- package/out/concepts/BackendVariable__.js.map +1 -1
- package/out/concepts/Backend__.d.ts +4 -7
- package/out/concepts/Backend__.js +16 -11
- package/out/concepts/Backend__.js.map +1 -1
- package/out/concepts/BatchAssignment__.d.ts +2 -2
- package/out/concepts/BatchAssignment__.js +30 -22
- package/out/concepts/BatchAssignment__.js.map +1 -1
- package/out/concepts/BinaryExpression__.d.ts +2 -2
- package/out/concepts/BinaryExpression__.js +30 -18
- package/out/concepts/BinaryExpression__.js.map +1 -1
- package/out/concepts/BindAttribute__.d.ts +10 -4
- package/out/concepts/BindAttribute__.js +144 -43
- package/out/concepts/BindAttribute__.js.map +1 -1
- package/out/concepts/BindDirective__.d.ts +2 -2
- package/out/concepts/BindDirective__.js +16 -11
- package/out/concepts/BindDirective__.js.map +1 -1
- package/out/concepts/BindEvent__.d.ts +4 -7
- package/out/concepts/BindEvent__.js +32 -24
- package/out/concepts/BindEvent__.js.map +1 -1
- package/out/concepts/BindStyle__.d.ts +2 -2
- package/out/concepts/BindStyle__.js +15 -10
- package/out/concepts/BindStyle__.js.map +1 -1
- package/out/concepts/BooleanLiteral__.d.ts +2 -2
- package/out/concepts/BooleanLiteral__.js +2 -2
- package/out/concepts/BooleanLiteral__.js.map +1 -1
- package/out/concepts/CallAuthInterface__.d.ts +2 -2
- package/out/concepts/CallAuthInterface__.js +36 -31
- package/out/concepts/CallAuthInterface__.js.map +1 -1
- package/out/concepts/CallConnector__.d.ts +2 -2
- package/out/concepts/CallConnector__.js +25 -23
- package/out/concepts/CallConnector__.js.map +1 -1
- package/out/concepts/CallFunction__.d.ts +2 -2
- package/out/concepts/CallFunction__.js +31 -22
- package/out/concepts/CallFunction__.js.map +1 -1
- package/out/concepts/CallInterface__.d.ts +2 -2
- package/out/concepts/CallInterface__.js +20 -29
- package/out/concepts/CallInterface__.js.map +1 -1
- package/out/concepts/CallLogic__.d.ts +2 -3
- package/out/concepts/CallLogic__.js +47 -50
- package/out/concepts/CallLogic__.js.map +1 -1
- package/out/concepts/CallQueryComponent__.d.ts +4 -4
- package/out/concepts/CallQueryComponent__.js +50 -42
- package/out/concepts/CallQueryComponent__.js.map +1 -1
- package/out/concepts/Comment__.d.ts +2 -2
- package/out/concepts/Comment__.js +3 -2
- package/out/concepts/Comment__.js.map +1 -1
- package/out/concepts/CompletionProperty__.js +6 -3
- package/out/concepts/CompletionProperty__.js.map +1 -1
- package/out/concepts/ConfigGroup__.js +6 -3
- package/out/concepts/ConfigGroup__.js.map +1 -1
- package/out/concepts/ConfigProperty__.d.ts +4 -7
- package/out/concepts/ConfigProperty__.js +18 -13
- package/out/concepts/ConfigProperty__.js.map +1 -1
- package/out/concepts/Configuration__.js +6 -3
- package/out/concepts/Configuration__.js.map +1 -1
- package/out/concepts/Connection__.d.ts +4 -7
- package/out/concepts/Connection__.js +12 -8
- package/out/concepts/Connection__.js.map +1 -1
- package/out/concepts/Connector__.js +30 -15
- package/out/concepts/Connector__.js.map +1 -1
- package/out/concepts/Constant__.d.ts +3 -3
- package/out/concepts/Constant__.js +18 -13
- package/out/concepts/Constant__.js.map +1 -1
- package/out/concepts/DataSource__.d.ts +4 -7
- package/out/concepts/DataSource__.js +13 -9
- package/out/concepts/DataSource__.js.map +1 -1
- package/out/concepts/Destination__.d.ts +3 -3
- package/out/concepts/Destination__.js +35 -29
- package/out/concepts/Destination__.js.map +1 -1
- package/out/concepts/End__.d.ts +2 -2
- package/out/concepts/End__.js +17 -13
- package/out/concepts/End__.js.map +1 -1
- package/out/concepts/EntityIndex__.d.ts +2 -2
- package/out/concepts/EntityIndex__.js +4 -3
- package/out/concepts/EntityIndex__.js.map +1 -1
- package/out/concepts/EntityProperty__.d.ts +2 -2
- package/out/concepts/EntityProperty__.js +22 -15
- package/out/concepts/EntityProperty__.js.map +1 -1
- package/out/concepts/Entity__.d.ts +4 -7
- package/out/concepts/Entity__.js +29 -21
- package/out/concepts/Entity__.js.map +1 -1
- package/out/concepts/EnumItem__.d.ts +2 -2
- package/out/concepts/EnumItem__.js +4 -3
- package/out/concepts/EnumItem__.js.map +1 -1
- package/out/concepts/Enum__.d.ts +4 -7
- package/out/concepts/Enum__.js +16 -11
- package/out/concepts/Enum__.js.map +1 -1
- package/out/concepts/Event__.js +6 -3
- package/out/concepts/Event__.js.map +1 -1
- package/out/concepts/ExternalDestination__.d.ts +2 -2
- package/out/concepts/ExternalDestination__.js +13 -8
- package/out/concepts/ExternalDestination__.js.map +1 -1
- package/out/concepts/ForEachStatement__.d.ts +2 -2
- package/out/concepts/ForEachStatement__.js +26 -18
- package/out/concepts/ForEachStatement__.js.map +1 -1
- package/out/concepts/FrontendLibrary__.js +18 -10
- package/out/concepts/FrontendLibrary__.js.map +1 -1
- package/out/concepts/Frontend__.d.ts +4 -7
- package/out/concepts/Frontend__.js +37 -21
- package/out/concepts/Frontend__.js.map +1 -1
- package/out/concepts/Function__.d.ts +3 -3
- package/out/concepts/Function__.js +52 -33
- package/out/concepts/Function__.js.map +1 -1
- package/out/concepts/Identifier__.d.ts +2 -2
- package/out/concepts/Identifier__.js +19 -18
- package/out/concepts/Identifier__.js.map +1 -1
- package/out/concepts/IfStatement__.d.ts +2 -2
- package/out/concepts/IfStatement__.js +18 -13
- package/out/concepts/IfStatement__.js.map +1 -1
- package/out/concepts/Integration__.js +17 -9
- package/out/concepts/Integration__.js.map +1 -1
- package/out/concepts/InterfaceParam__.d.ts +2 -2
- package/out/concepts/InterfaceParam__.js +12 -8
- package/out/concepts/InterfaceParam__.js.map +1 -1
- package/out/concepts/Interface__.d.ts +4 -7
- package/out/concepts/Interface__.js +44 -33
- package/out/concepts/Interface__.js.map +1 -1
- package/out/concepts/JSBlock__.d.ts +2 -2
- package/out/concepts/JSBlock__.js +3 -2
- package/out/concepts/JSBlock__.js.map +1 -1
- package/out/concepts/JavaLogic__.d.ts +2 -2
- package/out/concepts/JavaLogic__.js +6 -2
- package/out/concepts/JavaLogic__.js.map +1 -1
- package/out/concepts/LogicItem__.d.ts +2 -2
- package/out/concepts/LogicItem__.js +7 -3
- package/out/concepts/LogicItem__.js.map +1 -1
- package/out/concepts/Logic__.d.ts +8 -11
- package/out/concepts/Logic__.js +141 -136
- package/out/concepts/Logic__.js.map +1 -1
- package/out/concepts/MatchCase__.d.ts +2 -2
- package/out/concepts/MatchCase__.js +35 -27
- package/out/concepts/MatchCase__.js.map +1 -1
- package/out/concepts/Match__.d.ts +2 -2
- package/out/concepts/Match__.js +29 -24
- package/out/concepts/Match__.js.map +1 -1
- package/out/concepts/MemberExpression__.d.ts +2 -2
- package/out/concepts/MemberExpression__.js +34 -27
- package/out/concepts/MemberExpression__.js.map +1 -1
- package/out/concepts/MetadataType__.d.ts +4 -7
- package/out/concepts/MetadataType__.js +23 -15
- package/out/concepts/MetadataType__.js.map +1 -1
- package/out/concepts/MsgTriggerEvent__.js +6 -3
- package/out/concepts/MsgTriggerEvent__.js.map +1 -1
- package/out/concepts/MsgTriggerLauncher__.js +6 -3
- package/out/concepts/MsgTriggerLauncher__.js.map +1 -1
- package/out/concepts/Namespace__.js +66 -33
- package/out/concepts/Namespace__.js.map +1 -1
- package/out/concepts/NewComposite__.d.ts +5 -5
- package/out/concepts/NewComposite__.js +95 -82
- package/out/concepts/NewComposite__.js.map +1 -1
- package/out/concepts/NewList__.d.ts +5 -5
- package/out/concepts/NewList__.js +42 -32
- package/out/concepts/NewList__.js.map +1 -1
- package/out/concepts/NewMap__.d.ts +4 -4
- package/out/concepts/NewMap__.js +51 -41
- package/out/concepts/NewMap__.js.map +1 -1
- package/out/concepts/New__.d.ts +2 -2
- package/out/concepts/New__.js +3 -2
- package/out/concepts/New__.js.map +1 -1
- package/out/concepts/NullLiteral__.d.ts +2 -2
- package/out/concepts/NullLiteral__.js +2 -2
- package/out/concepts/NullLiteral__.js.map +1 -1
- package/out/concepts/NumericLiteral__.d.ts +2 -2
- package/out/concepts/NumericLiteral__.js +12 -7
- package/out/concepts/NumericLiteral__.js.map +1 -1
- package/out/concepts/OqlQueryComponent__.d.ts +2 -2
- package/out/concepts/OqlQueryComponent__.js +22 -17
- package/out/concepts/OqlQueryComponent__.js.map +1 -1
- package/out/concepts/OverriddenLogic__.d.ts +8 -11
- package/out/concepts/OverriddenLogic__.js +135 -130
- package/out/concepts/OverriddenLogic__.js.map +1 -1
- package/out/concepts/Param__.d.ts +3 -3
- package/out/concepts/Param__.js +29 -24
- package/out/concepts/Param__.js.map +1 -1
- package/out/concepts/ProcessComponent__.js +12 -6
- package/out/concepts/ProcessComponent__.js.map +1 -1
- package/out/concepts/ProcessElement__.d.ts +2 -2
- package/out/concepts/ProcessElement__.js +92 -66
- package/out/concepts/ProcessElement__.js.map +1 -1
- package/out/concepts/ProcessOutcome__.d.ts +2 -1
- package/out/concepts/ProcessOutcome__.js +5 -4
- package/out/concepts/ProcessOutcome__.js.map +1 -1
- package/out/concepts/ProcessOutcomes__.d.ts +2 -1
- package/out/concepts/ProcessOutcomes__.js +6 -5
- package/out/concepts/ProcessOutcomes__.js.map +1 -1
- package/out/concepts/Process__.d.ts +4 -7
- package/out/concepts/Process__.js +51 -34
- package/out/concepts/Process__.js.map +1 -1
- package/out/concepts/QueryAggregateExpression__.d.ts +2 -2
- package/out/concepts/QueryAggregateExpression__.js +8 -5
- package/out/concepts/QueryAggregateExpression__.js.map +1 -1
- package/out/concepts/QueryFieldExpression__.d.ts +2 -2
- package/out/concepts/QueryFieldExpression__.js +5 -4
- package/out/concepts/QueryFieldExpression__.js.map +1 -1
- package/out/concepts/QueryFromExpression__.d.ts +2 -2
- package/out/concepts/QueryFromExpression__.js +14 -9
- package/out/concepts/QueryFromExpression__.js.map +1 -1
- package/out/concepts/QueryGroupByExpression__.d.ts +2 -1
- package/out/concepts/QueryGroupByExpression__.js +12 -8
- package/out/concepts/QueryGroupByExpression__.js.map +1 -1
- package/out/concepts/QueryJoinExpression__.d.ts +2 -2
- package/out/concepts/QueryJoinExpression__.js +18 -13
- package/out/concepts/QueryJoinExpression__.js.map +1 -1
- package/out/concepts/QueryLimitExpression__.d.ts +2 -2
- package/out/concepts/QueryLimitExpression__.js +12 -8
- package/out/concepts/QueryLimitExpression__.js.map +1 -1
- package/out/concepts/QueryOrderByExpression__.d.ts +2 -2
- package/out/concepts/QueryOrderByExpression__.js +12 -8
- package/out/concepts/QueryOrderByExpression__.js.map +1 -1
- package/out/concepts/QuerySelectExpression__.js +6 -3
- package/out/concepts/QuerySelectExpression__.js.map +1 -1
- package/out/concepts/Return__.d.ts +3 -3
- package/out/concepts/Return__.js +21 -16
- package/out/concepts/Return__.js.map +1 -1
- package/out/concepts/Role__.d.ts +4 -7
- package/out/concepts/Role__.js +7 -6
- package/out/concepts/Role__.js.map +1 -1
- package/out/concepts/SelectMembers__.d.ts +2 -2
- package/out/concepts/SelectMembers__.js +9 -5
- package/out/concepts/SelectMembers__.js.map +1 -1
- package/out/concepts/Slot__.js +6 -3
- package/out/concepts/Slot__.js.map +1 -1
- package/out/concepts/SqlQueryComponent__.d.ts +2 -2
- package/out/concepts/SqlQueryComponent__.js +18 -13
- package/out/concepts/SqlQueryComponent__.js.map +1 -1
- package/out/concepts/Start__.d.ts +2 -2
- package/out/concepts/Start__.js +2 -2
- package/out/concepts/Start__.js.map +1 -1
- package/out/concepts/StringInterpolation__.d.ts +2 -2
- package/out/concepts/StringInterpolation__.js +13 -8
- package/out/concepts/StringInterpolation__.js.map +1 -1
- package/out/concepts/StringLiteral__.d.ts +2 -2
- package/out/concepts/StringLiteral__.js +4 -3
- package/out/concepts/StringLiteral__.js.map +1 -1
- package/out/concepts/StructureProperty__.d.ts +2 -2
- package/out/concepts/StructureProperty__.js +14 -10
- package/out/concepts/StructureProperty__.js.map +1 -1
- package/out/concepts/Structure__.d.ts +4 -7
- package/out/concepts/Structure__.js +22 -14
- package/out/concepts/Structure__.js.map +1 -1
- package/out/concepts/SwitchCase__.d.ts +2 -2
- package/out/concepts/SwitchCase__.js +18 -13
- package/out/concepts/SwitchCase__.js.map +1 -1
- package/out/concepts/SwitchStatement__.d.ts +2 -2
- package/out/concepts/SwitchStatement__.js +14 -9
- package/out/concepts/SwitchStatement__.js.map +1 -1
- package/out/concepts/TriggerEvent__.js +6 -3
- package/out/concepts/TriggerEvent__.js.map +1 -1
- package/out/concepts/TriggerLauncher__.d.ts +4 -7
- package/out/concepts/TriggerLauncher__.js +7 -6
- package/out/concepts/TriggerLauncher__.js.map +1 -1
- package/out/concepts/TypeAnnotation__.d.ts +2 -2
- package/out/concepts/TypeAnnotation__.js +61 -29
- package/out/concepts/TypeAnnotation__.js.map +1 -1
- package/out/concepts/TypeParam__.d.ts +2 -2
- package/out/concepts/TypeParam__.js +4 -3
- package/out/concepts/TypeParam__.js.map +1 -1
- package/out/concepts/UnaryExpression__.d.ts +2 -2
- package/out/concepts/UnaryExpression__.js +18 -10
- package/out/concepts/UnaryExpression__.js.map +1 -1
- package/out/concepts/Unparsed__.d.ts +2 -1
- package/out/concepts/Unparsed__.js +2 -2
- package/out/concepts/Unparsed__.js.map +1 -1
- package/out/concepts/ValidationRule__.d.ts +2 -2
- package/out/concepts/ValidationRule__.js +17 -12
- package/out/concepts/ValidationRule__.js.map +1 -1
- package/out/concepts/Variable__.d.ts +5 -8
- package/out/concepts/Variable__.js +23 -18
- package/out/concepts/Variable__.js.map +1 -1
- package/out/concepts/ViewElement__.d.ts +7 -6
- package/out/concepts/ViewElement__.js +139 -101
- package/out/concepts/ViewElement__.js.map +1 -1
- package/out/concepts/View__.d.ts +8 -9
- package/out/concepts/View__.js +73 -62
- package/out/concepts/View__.js.map +1 -1
- package/out/concepts/WhileStatement__.d.ts +2 -2
- package/out/concepts/WhileStatement__.js +9 -7
- package/out/concepts/WhileStatement__.js.map +1 -1
- package/out/manager/diagnostic.d.ts +1 -1
- package/out/manager/diagnostic.js +2 -3
- package/out/manager/diagnostic.js.map +1 -1
- package/out/server/naslServer.d.ts +46 -55
- package/out/server/naslServer.js +302 -449
- package/out/server/naslServer.js.map +1 -1
- package/out/server/translator.js +1 -1
- package/out/server/translator.js.map +1 -1
- package/out/templator/genCreateBlock.js +4 -4
- package/out/templator/genCreateBlock.js.map +1 -1
- package/out/templator/genCurdEditMultipleKeyBlock.js +6 -6
- package/out/templator/genCurdEditMultipleKeyBlock.js.map +1 -1
- package/out/templator/genCurdMultipleKeyBlock.js +4 -4
- package/out/templator/genCurdMultipleKeyBlock.js.map +1 -1
- package/out/templator/genEditTableBlock.js +2 -2
- package/out/templator/genEditTableBlock.js.map +1 -1
- package/out/templator/genUpdateBlock.js +4 -4
- package/out/templator/genUpdateBlock.js.map +1 -1
- package/out/translator/types.d.ts +16 -3
- package/out/translator/utils.d.ts +19 -1
- package/out/translator/utils.js +71 -2
- package/out/translator/utils.js.map +1 -1
- package/out/utils/time-slicing/constant.d.ts +35 -0
- package/out/utils/time-slicing/constant.js +40 -0
- package/out/utils/time-slicing/constant.js.map +1 -0
- package/out/utils/time-slicing/controller.d.ts +53 -0
- package/out/utils/time-slicing/controller.js +280 -0
- package/out/utils/time-slicing/controller.js.map +1 -0
- package/out/utils/time-slicing/index.d.ts +5 -0
- package/out/utils/time-slicing/index.js +26 -0
- package/out/utils/time-slicing/index.js.map +1 -0
- package/out/utils/time-slicing/page-state.d.ts +2 -0
- package/out/utils/time-slicing/page-state.js +14 -0
- package/out/utils/time-slicing/page-state.js.map +1 -0
- package/out/utils/time-slicing/performance.d.ts +11 -0
- package/out/utils/time-slicing/performance.js +51 -0
- package/out/utils/time-slicing/performance.js.map +1 -0
- package/out/utils/time-slicing/runner.d.ts +12 -0
- package/out/utils/time-slicing/runner.js +53 -0
- package/out/utils/time-slicing/runner.js.map +1 -0
- package/out/utils/time-slicing/tool.d.ts +24 -0
- package/out/utils/time-slicing/tool.js +47 -0
- package/out/utils/time-slicing/tool.js.map +1 -0
- package/out/utils/time-slicing/utils.d.ts +62 -0
- package/out/utils/time-slicing/utils.js +47 -0
- package/out/utils/time-slicing/utils.js.map +1 -0
- package/out/utils/time-slicing/wrapper.d.ts +18 -0
- package/out/utils/time-slicing/wrapper.js +55 -0
- package/out/utils/time-slicing/wrapper.js.map +1 -0
- package/out/utils/types.d.ts +7 -0
- package/package.json +1 -1
- package/src/bak/translator.js +75 -16
- package/src/common/BaseNode.ts +67 -6
- package/src/common/index.ts +1 -0
- package/src/common/utils.ts +17 -0
- package/src/concepts/Abort__.ts +12 -3
- package/src/concepts/Anchor__.ts +21 -8
- package/src/concepts/AnonymousFunction__.ts +45 -31
- package/src/concepts/App__.ts +137 -69
- package/src/concepts/Argument__.ts +31 -14
- package/src/concepts/Assignee__.ts +42 -21
- package/src/concepts/AssignmentLine__.ts +13 -3
- package/src/concepts/Assignment__.ts +26 -14
- package/src/concepts/Attribute__.ts +6 -3
- package/src/concepts/AuthLogicForCallInterface__.ts +69 -87
- package/src/concepts/BackendVariable__.ts +34 -19
- package/src/concepts/Backend__.ts +33 -12
- package/src/concepts/BatchAssignment__.ts +41 -23
- package/src/concepts/BinaryExpression__.ts +40 -20
- package/src/concepts/BindAttribute__.ts +151 -49
- package/src/concepts/BindDirective__.ts +25 -12
- package/src/concepts/BindEvent__.ts +43 -32
- package/src/concepts/BindStyle__.ts +24 -11
- package/src/concepts/BooleanLiteral__.ts +11 -3
- package/src/concepts/CallAuthInterface__.ts +45 -34
- package/src/concepts/CallConnector__.ts +34 -26
- package/src/concepts/CallFunction__.ts +34 -23
- package/src/concepts/CallInterface__.ts +33 -42
- package/src/concepts/CallLogic__.ts +60 -67
- package/src/concepts/CallQueryComponent__.ts +60 -52
- package/src/concepts/Comment__.ts +13 -3
- package/src/concepts/CompletionProperty__.ts +6 -3
- package/src/concepts/ConfigGroup__.ts +6 -3
- package/src/concepts/ConfigProperty__.ts +28 -15
- package/src/concepts/Configuration__.ts +6 -3
- package/src/concepts/Connection__.ts +28 -9
- package/src/concepts/Connector__.ts +30 -15
- package/src/concepts/Constant__.ts +28 -14
- package/src/concepts/DataSource__.ts +22 -10
- package/src/concepts/Destination__.ts +45 -36
- package/src/concepts/End__.ts +24 -15
- package/src/concepts/EntityIndex__.ts +13 -4
- package/src/concepts/EntityProperty__.ts +33 -17
- package/src/concepts/Entity__.ts +40 -25
- package/src/concepts/EnumItem__.ts +13 -4
- package/src/concepts/Enum__.ts +27 -13
- package/src/concepts/Event__.ts +6 -3
- package/src/concepts/ExternalDestination__.ts +22 -10
- package/src/concepts/ForEachStatement__.ts +36 -20
- package/src/concepts/FrontendLibrary__.ts +18 -10
- package/src/concepts/Frontend__.ts +48 -22
- package/src/concepts/Function__.ts +60 -36
- package/src/concepts/Identifier__.ts +28 -23
- package/src/concepts/IfStatement__.ts +28 -17
- package/src/concepts/Integration__.ts +17 -9
- package/src/concepts/InterfaceParam__.ts +22 -9
- package/src/concepts/Interface__.ts +55 -37
- package/src/concepts/JSBlock__.ts +12 -3
- package/src/concepts/JavaLogic__.ts +13 -3
- package/src/concepts/LogicItem__.ts +13 -4
- package/src/concepts/Logic__.ts +159 -149
- package/src/concepts/MatchCase__.ts +45 -32
- package/src/concepts/Match__.ts +39 -28
- package/src/concepts/MemberExpression__.ts +43 -28
- package/src/concepts/MetadataType__.ts +34 -16
- package/src/concepts/MsgTriggerEvent__.ts +6 -3
- package/src/concepts/MsgTriggerLauncher__.ts +6 -3
- package/src/concepts/Namespace__.ts +66 -33
- package/src/concepts/NewComposite__.ts +106 -87
- package/src/concepts/NewList__.ts +52 -38
- package/src/concepts/NewMap__.ts +61 -48
- package/src/concepts/New__.ts +13 -3
- package/src/concepts/NullLiteral__.ts +11 -3
- package/src/concepts/NumericLiteral__.ts +21 -8
- package/src/concepts/OqlQueryComponent__.ts +32 -21
- package/src/concepts/OverriddenLogic__.ts +153 -143
- package/src/concepts/Param__.ts +48 -34
- package/src/concepts/ProcessComponent__.ts +12 -6
- package/src/concepts/ProcessElement__.ts +102 -76
- package/src/concepts/ProcessOutcome__.ts +16 -8
- package/src/concepts/ProcessOutcomes__.ts +17 -9
- package/src/concepts/Process__.ts +62 -41
- package/src/concepts/QueryAggregateExpression__.ts +17 -6
- package/src/concepts/QueryFieldExpression__.ts +14 -5
- package/src/concepts/QueryFromExpression__.ts +24 -10
- package/src/concepts/QueryGroupByExpression__.ts +20 -9
- package/src/concepts/QueryJoinExpression__.ts +28 -14
- package/src/concepts/QueryLimitExpression__.ts +22 -9
- package/src/concepts/QueryOrderByExpression__.ts +23 -9
- package/src/concepts/QuerySelectExpression__.ts +6 -3
- package/src/concepts/Return__.ts +31 -17
- package/src/concepts/Role__.ts +17 -8
- package/src/concepts/SelectMembers__.ts +19 -6
- package/src/concepts/Slot__.ts +6 -3
- package/src/concepts/SqlQueryComponent__.ts +28 -14
- package/src/concepts/Start__.ts +11 -3
- package/src/concepts/StringInterpolation__.ts +16 -8
- package/src/concepts/StringLiteral__.ts +13 -4
- package/src/concepts/StructureProperty__.ts +24 -11
- package/src/concepts/Structure__.ts +33 -16
- package/src/concepts/SwitchCase__.ts +28 -17
- package/src/concepts/SwitchStatement__.ts +23 -10
- package/src/concepts/TriggerEvent__.ts +6 -3
- package/src/concepts/TriggerLauncher__.ts +17 -7
- package/src/concepts/TypeAnnotation__.ts +46 -30
- package/src/concepts/TypeParam__.ts +13 -4
- package/src/concepts/UnaryExpression__.ts +28 -12
- package/src/concepts/Unparsed__.ts +10 -3
- package/src/concepts/ValidationRule__.ts +27 -20
- package/src/concepts/Variable__.ts +34 -19
- package/src/concepts/ViewElement__.ts +165 -125
- package/src/concepts/View__.ts +108 -89
- package/src/concepts/WhileStatement__.ts +19 -10
- package/src/concepts/types__.ts +1 -1
- package/src/manager/diagnostic.ts +3 -4
- package/src/server/naslServer.ts +676 -729
- package/src/server/translator.ts +1 -1
- package/src/templator/genCreateBlock.ts +4 -4
- package/src/templator/genCurdEditMultipleKeyBlock.ts +6 -6
- package/src/templator/genCurdMultipleKeyBlock.ts +4 -4
- package/src/templator/genEditTableBlock.ts +2 -2
- package/src/templator/genUpdateBlock.ts +4 -4
- package/src/translator/types.ts +20 -5
- package/src/translator/utils.ts +78 -4
- package/src/utils/time-slicing/constant.ts +37 -0
- package/src/utils/time-slicing/controller.ts +342 -0
- package/src/utils/time-slicing/index.ts +6 -0
- package/src/utils/time-slicing/page-state.ts +12 -0
- package/src/utils/time-slicing/performance.ts +56 -0
- package/src/utils/time-slicing/runner.ts +54 -0
- package/src/utils/time-slicing/tool.ts +45 -0
- package/src/utils/time-slicing/utils.ts +90 -0
- package/src/utils/time-slicing/wrapper.ts +58 -0
- package/src/utils/types.ts +9 -0
- package/test/concepts/anonymous-function/__snapshots__/toEmbeddedTS.spec.ts.snap +8 -0
- package/test/concepts/anonymous-function/__snapshots__/toJS.spec.ts.snap +3 -0
- package/test/concepts/anonymous-function/__snapshots__/toVue.spec.ts.snap +6 -0
- package/test/concepts/anonymous-function/constant.ts +5 -0
- package/test/concepts/anonymous-function/fixtures/simple.json +85 -0
- package/test/concepts/anonymous-function/toEmbeddedTS.spec.ts +15 -0
- package/test/concepts/anonymous-function/toJS.spec.ts +14 -0
- package/test/concepts/anonymous-function/toVue.spec.ts +14 -0
- package/test/concepts/assignment/__snapshots__/toEmbeddedTS.spec.ts.snap +21 -0
- package/test/concepts/assignment/__snapshots__/toJS.spec.ts.snap +9 -0
- package/test/concepts/assignment/__snapshots__/toVue.spec.ts.snap +21 -0
- package/test/concepts/assignment/constant.ts +5 -0
- package/test/concepts/assignment/fixtures/both-space.json +4 -0
- package/test/concepts/assignment/fixtures/left-space.json +14 -0
- package/test/concepts/assignment/fixtures/right-space.json +8 -0
- package/test/concepts/assignment/fixtures/simple.json +12 -0
- package/test/concepts/assignment/toEmbeddedTS.spec.ts +15 -0
- package/test/concepts/assignment/toJS.spec.ts +14 -0
- package/test/concepts/assignment/toVue.spec.ts +14 -0
- package/test/concepts/batch-assignment/__snapshots__/toEmbeddedTS.spec.ts.snap +28 -0
- package/test/concepts/batch-assignment/__snapshots__/toJS.spec.ts.snap +13 -0
- package/test/concepts/batch-assignment/__snapshots__/toVue.spec.ts.snap +14 -0
- package/test/concepts/batch-assignment/constant.ts +5 -0
- package/test/concepts/batch-assignment/fixtures/muli-var-muli-value.json +144 -0
- package/test/concepts/batch-assignment/fixtures/simple-var-simple-value.json +36 -0
- package/test/concepts/batch-assignment/toEmbeddedTS.spec.ts +15 -0
- package/test/concepts/batch-assignment/toJS.spec.ts +14 -0
- package/test/concepts/batch-assignment/toVue.spec.ts +14 -0
- package/test/concepts/binary-expression/__snapshots__/toEmbeddedTS.spec.ts.snap +25 -0
- package/test/concepts/binary-expression/__snapshots__/toJS.spec.ts.snap +17 -0
- package/test/concepts/binary-expression/__snapshots__/toVue.spec.ts.snap +19 -0
- package/test/concepts/binary-expression/constant.ts +5 -0
- package/test/concepts/binary-expression/fixtures/constant-nested.json +36 -0
- package/test/concepts/binary-expression/fixtures/constant-simple.json +12 -0
- package/test/concepts/binary-expression/fixtures/variable-nested.json +69 -0
- package/test/concepts/binary-expression/toEmbeddedTS.spec.ts +15 -0
- package/test/concepts/binary-expression/toJS.spec.ts +14 -0
- package/test/concepts/binary-expression/toVue.spec.ts +14 -0
- package/test/concepts/boolean-literal/toEmbeddedTS.spec.ts +4 -3
- package/test/concepts/boolean-literal/toJS.spec.ts +2 -2
- package/test/concepts/boolean-literal/toVue.spec.ts +2 -2
- package/test/concepts/call-function/toEmbeddedTS.spec.ts +2 -1
- package/test/concepts/call-interface/toEmbeddedTS.spec.ts +2 -1
- package/test/concepts/call-logic/getQuickInfoOffset.spec.ts +2 -1
- package/test/concepts/call-logic/toEmbeddedTS.spec.ts +2 -1
- package/test/concepts/data-source/__snapshots__/toEmbeddedTS.spec.ts.snap +8 -0
- package/test/concepts/data-source/__snapshots__/toEmbeddedTSFile.spec.ts.snap +12 -0
- package/test/concepts/data-source/constant.ts +5 -0
- package/test/concepts/data-source/fixtures/normal.json +289 -0
- package/test/concepts/data-source/toEmbeddedTS.spec.ts +15 -0
- package/test/concepts/data-source/toEmbeddedTSFile.spec.ts +16 -0
- package/test/concepts/entity/__snapshots__/toEmbeddedTS.spec.ts.snap +74 -0
- package/test/concepts/entity/__snapshots__/toEmbeddedTSFile.spec.ts.snap +3 -0
- package/test/concepts/entity/constant.ts +5 -0
- package/test/concepts/entity/fixtures/normal.json +469 -0
- package/test/concepts/entity/toEmbeddedTS.spec.ts +15 -0
- package/test/concepts/entity/toEmbeddedTSFile.spec.ts +14 -0
- package/test/concepts/identifier/toEmbeddedTS.spec.ts +4 -3
- package/test/concepts/identifier/toJS.spec.ts +2 -2
- package/test/concepts/identifier/toVue.spec.ts +2 -2
- package/test/concepts/match/toEmbeddedTS.spec.ts +2 -1
- package/test/concepts/member-expression/toEmbeddedTS.spec.ts +2 -1
- package/test/concepts/member-expression/toVue.spec.ts +2 -2
- package/test/concepts/null-literal/toEmbeddedTS.spec.ts +4 -3
- package/test/concepts/null-literal/toJS.spec.ts +2 -2
- package/test/concepts/null-literal/toVue.spec.ts +2 -2
- package/test/concepts/numeric-literal/toEmbeddedTS.spec.ts +4 -3
- package/test/concepts/numeric-literal/toJS.spec.ts +2 -2
- package/test/concepts/numeric-literal/toVue.spec.ts +2 -2
- package/test/concepts/string-literal/toEmbeddedTS.spec.ts +4 -3
- package/test/concepts/string-literal/toJS.spec.ts +2 -2
- package/test/concepts/string-literal/toVue.spec.ts +2 -2
- package/test/concepts/validation-rule/toEmbeddedTS.spec.ts +2 -1
- package/test/concepts/validation-rule/validation-rule.spec.ts +2 -1
- package/test/concepts/view-element/__snapshots__/toVue.spec.ts.snap +0 -2
- package/test/concepts/view-element/toEmbeddedTS.spec.ts +2 -1
- package/test/time-slicing/runner.spec.ts +28 -0
- package/test/time-slicing/time-slicing-nodejs.spec.ts +27 -0
- package/test/time-slicing/utils.ts +7 -0
- package/test/time-slicing/wrapper.spec.ts +92 -0
- package/ts-worker/lib/tsserver.js +10 -1
- package/ts-worker/package.json +1 -0
- package/ts-worker/src/index.js +13 -12
- package/ts-worker/webpack.config.js +1 -1
- package/out/utils/time-slicing.d.ts +0 -41
- package/out/utils/time-slicing.js +0 -82
- package/out/utils/time-slicing.js.map +0 -1
- package/src/utils/time-slicing.ts +0 -111
|
@@ -189,9 +189,12 @@ export class Attribute extends BaseNode {
|
|
|
189
189
|
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
190
190
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
191
191
|
params.index = index;
|
|
192
|
-
} else
|
|
193
|
-
|
|
194
|
-
(
|
|
192
|
+
} else {
|
|
193
|
+
const q = (t as any)[parentKey];
|
|
194
|
+
if ((q.__v_raw || q) === n) {
|
|
195
|
+
params.index = 0;
|
|
196
|
+
(this as any)[parentKey] = undefined;
|
|
197
|
+
}
|
|
195
198
|
}
|
|
196
199
|
}
|
|
197
200
|
return params;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import {
|
|
2
|
+
wrapForEachToGenerator as wrapForEach,
|
|
3
|
+
wrapIteratorToGenerator as wrapIterator,
|
|
4
|
+
returnOrigin,
|
|
5
|
+
} from '../utils/time-slicing';
|
|
1
6
|
import {
|
|
2
7
|
TranslatorState,
|
|
3
8
|
shiftState,
|
|
@@ -5,7 +10,11 @@ import {
|
|
|
5
10
|
indent,
|
|
6
11
|
createCompilerState,
|
|
7
12
|
embeddedTSEmitter,
|
|
13
|
+
withSourceMapGenerator,
|
|
14
|
+
withGenerator,
|
|
15
|
+
TranslatorGenerator,
|
|
8
16
|
} from '../translator';
|
|
17
|
+
import { waitOqlQueryComponentChildrenFinish } from '../common';
|
|
9
18
|
import Namespace from './Namespace__';
|
|
10
19
|
import CallQueryComponent from './CallQueryComponent__';
|
|
11
20
|
import Assignment from './Assignment__';
|
|
@@ -264,9 +273,12 @@ export class AuthLogicForCallInterface extends AuthLogic {
|
|
|
264
273
|
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
265
274
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
266
275
|
params.index = index;
|
|
267
|
-
} else
|
|
268
|
-
|
|
269
|
-
(
|
|
276
|
+
} else {
|
|
277
|
+
const q = (t as any)[parentKey];
|
|
278
|
+
if ((q.__v_raw || q) === n) {
|
|
279
|
+
params.index = 0;
|
|
280
|
+
(this as any)[parentKey] = undefined;
|
|
281
|
+
}
|
|
270
282
|
}
|
|
271
283
|
}
|
|
272
284
|
return params;
|
|
@@ -277,20 +289,23 @@ export class AuthLogicForCallInterface extends AuthLogic {
|
|
|
277
289
|
// 自动生成的代码已结束。下面可以手动编写。
|
|
278
290
|
//================================================================================
|
|
279
291
|
|
|
280
|
-
@
|
|
281
|
-
toEmbeddedTS(state
|
|
292
|
+
@withSourceMapGenerator
|
|
293
|
+
*toEmbeddedTS(state = createCompilerState(), prefix?: string): TranslatorGenerator {
|
|
294
|
+
const self = this;
|
|
295
|
+
// 等待 oql 查询返回内容
|
|
296
|
+
yield waitOqlQueryComponentChildrenFinish(self);
|
|
282
297
|
// 如果传了不要前缀那就为空, 要不用传进来的,要是都没有就默认导出
|
|
283
298
|
let code = '';
|
|
284
299
|
if (!prefix) {
|
|
285
300
|
// T、U分别用来定义 api 入参和返回值
|
|
286
|
-
code += `export function ${
|
|
301
|
+
code += `export function ${self.name}`;
|
|
287
302
|
} else if (prefix === 'noExport') {
|
|
288
|
-
code += `function ${
|
|
303
|
+
code += `function ${self.name}`;
|
|
289
304
|
} else if (prefix === 'inObject') {
|
|
290
|
-
code += `${
|
|
305
|
+
code += `${self.name}`;
|
|
291
306
|
}
|
|
292
307
|
const typeParams = [
|
|
293
|
-
...(
|
|
308
|
+
...(self.typeParams || []),
|
|
294
309
|
new TypeParam({
|
|
295
310
|
name: 'ApiParams',
|
|
296
311
|
}),
|
|
@@ -300,8 +315,8 @@ export class AuthLogicForCallInterface extends AuthLogic {
|
|
|
300
315
|
];
|
|
301
316
|
if (typeParams?.length) {
|
|
302
317
|
code += '<';
|
|
303
|
-
typeParams
|
|
304
|
-
code += typeParam.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
318
|
+
yield* wrapForEach(typeParams, function* warpForEachGenerator(typeParam, typeParamIndex) {
|
|
319
|
+
code += yield* typeParam.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
305
320
|
if (typeParamIndex !== typeParams.length - 1) {
|
|
306
321
|
code += ', ';
|
|
307
322
|
}
|
|
@@ -309,10 +324,10 @@ export class AuthLogicForCallInterface extends AuthLogic {
|
|
|
309
324
|
code += '>';
|
|
310
325
|
}
|
|
311
326
|
// 有参数长度 && 鉴权参数
|
|
312
|
-
if (
|
|
327
|
+
if (self.authParams.length) {
|
|
313
328
|
// const params = [...this.authParams, ...this.params];
|
|
314
|
-
const params = [...
|
|
315
|
-
params
|
|
329
|
+
const params = [...self.authParams];
|
|
330
|
+
yield* wrapForEach(params, function* warpForEachGenerator(param, index) {
|
|
316
331
|
if (index === 0) {
|
|
317
332
|
code += '({';
|
|
318
333
|
}
|
|
@@ -323,11 +338,11 @@ export class AuthLogicForCallInterface extends AuthLogic {
|
|
|
323
338
|
code += ', api}:';
|
|
324
339
|
}
|
|
325
340
|
});
|
|
326
|
-
params
|
|
341
|
+
yield* wrapForEach(params, function* warpForEachGenerator(param, index) {
|
|
327
342
|
if (index === 0) {
|
|
328
343
|
code += '{';
|
|
329
344
|
}
|
|
330
|
-
code += param.toEmbeddedTS(shiftState(state, code), !param.required);
|
|
345
|
+
code += yield* param.toEmbeddedTS(shiftState(state, code), !param.required);
|
|
331
346
|
if (index !== params.length - 1) {
|
|
332
347
|
code += ', ';
|
|
333
348
|
} else {
|
|
@@ -339,79 +354,53 @@ export class AuthLogicForCallInterface extends AuthLogic {
|
|
|
339
354
|
// 没有参数的
|
|
340
355
|
code += '({api}: {api?: ApiReturn}): ApiReturn';
|
|
341
356
|
}
|
|
342
|
-
|
|
343
357
|
// 需要类型推导的局部变量/返回值需要调整申明顺序
|
|
344
358
|
const advanceMap: Map<Return | Variable, Assignment | BatchAssignment> = new Map();
|
|
345
|
-
const needGetSourceMapOqlList: Promise<any>[] = [];
|
|
346
|
-
|
|
359
|
+
// const needGetSourceMapOqlList: Promise<any>[] = [];
|
|
360
|
+
yield* self.traverseChildrenGenerator(function* traverseChildrenGenerator(el) {
|
|
347
361
|
if (el && (el instanceof BatchAssignment || (el instanceof Assignment && el.left?.name))) {
|
|
348
362
|
if (el instanceof Assignment) {
|
|
349
|
-
const advanceVar =
|
|
363
|
+
const advanceVar = self.variables?.find(
|
|
350
364
|
(variable) => !variable.typeAnnotation && el.left?.name === variable.name,
|
|
351
365
|
);
|
|
352
366
|
if (advanceVar && !advanceMap.get(advanceVar)) {
|
|
353
367
|
advanceMap.set(advanceVar, el);
|
|
354
368
|
}
|
|
355
|
-
const advanceRn =
|
|
369
|
+
const advanceRn = self.returns?.find((ret) => !ret.typeAnnotation && el.left?.name === ret.name);
|
|
356
370
|
if (advanceRn && !advanceMap.get(advanceRn)) {
|
|
357
371
|
advanceMap.set(advanceRn, el);
|
|
358
372
|
}
|
|
359
373
|
} else if (el instanceof BatchAssignment) {
|
|
360
|
-
el.assignmentLines
|
|
374
|
+
yield* wrapForEach(el.assignmentLines, function* warpForEachGenerator({ leftIndex }) {
|
|
361
375
|
const leftCode =
|
|
362
376
|
leftIndex.length === 1
|
|
363
|
-
? el.left.expression.toEmbeddedTS(shiftState(state, code, { inline: true }))
|
|
364
|
-
: el.left.members[leftIndex[1]]?.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
365
|
-
const advanceVar =
|
|
377
|
+
? yield* el.left.expression.toEmbeddedTS(shiftState(state, code, { inline: true }))
|
|
378
|
+
: yield* el.left.members[leftIndex[1]]?.toEmbeddedTS(shiftState(state, code, { inline: true })) ?? returnOrigin('');
|
|
379
|
+
const advanceVar = self.variables?.find(
|
|
366
380
|
(variable) => !variable.typeAnnotation && leftCode === variable.name,
|
|
367
381
|
);
|
|
368
382
|
if (advanceVar && !advanceMap.get(advanceVar)) {
|
|
369
383
|
advanceMap.set(advanceVar, el);
|
|
370
384
|
}
|
|
371
|
-
const advanceRn =
|
|
385
|
+
const advanceRn = self.returns?.find((ret) => !ret.typeAnnotation && leftCode === ret.name);
|
|
372
386
|
if (advanceRn && !advanceMap.get(advanceRn)) {
|
|
373
387
|
advanceMap.set(advanceRn, el);
|
|
374
388
|
}
|
|
375
389
|
});
|
|
376
390
|
}
|
|
377
391
|
}
|
|
378
|
-
// 如果有sql查询组件就需要把他们存起来
|
|
379
|
-
if (el instanceof OqlQueryComponent) {
|
|
380
|
-
if (!el.codeSourceMap) {
|
|
381
|
-
needGetSourceMapOqlList.push(el.requestEmbeddedTS());
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
392
|
});
|
|
385
|
-
|
|
386
|
-
if (needGetSourceMapOqlList.length) {
|
|
387
|
-
Promise.all(needGetSourceMapOqlList).then(() => {
|
|
388
|
-
// 触发一下更新重新生成代码
|
|
389
|
-
(this.app as any)?.naslServer?.embeddedTSEmitter.emit('change', {
|
|
390
|
-
value: [
|
|
391
|
-
{
|
|
392
|
-
originEvent: {
|
|
393
|
-
action: 'update',
|
|
394
|
-
target: this,
|
|
395
|
-
},
|
|
396
|
-
},
|
|
397
|
-
],
|
|
398
|
-
});
|
|
399
|
-
});
|
|
400
|
-
}
|
|
401
|
-
|
|
402
393
|
code += '{\n';
|
|
403
|
-
|
|
404
394
|
// 用于虚拟节点的查找引用
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
this.virtualParams.forEach((param) => {
|
|
395
|
+
if (Array.isArray(self.virtualParams)) {
|
|
396
|
+
for (const param of self.virtualParams) {
|
|
408
397
|
code += indent((state?.tabSize || 0) + 1);
|
|
409
|
-
code += param.toEmbeddedNameTS(shiftState(state, code, { inline: true }));
|
|
398
|
+
code += yield* param.toEmbeddedNameTS(shiftState(state, code, { inline: true }));
|
|
410
399
|
code += '\n';
|
|
411
|
-
}
|
|
412
|
-
|
|
400
|
+
}
|
|
401
|
+
}
|
|
413
402
|
const variables = [
|
|
414
|
-
...
|
|
403
|
+
...self.variables,
|
|
415
404
|
new Variable({
|
|
416
405
|
// 将默认参数加为变量 用于参数选择校验
|
|
417
406
|
name: 'request',
|
|
@@ -431,24 +420,23 @@ export class AuthLogicForCallInterface extends AuthLogic {
|
|
|
431
420
|
}),
|
|
432
421
|
}),
|
|
433
422
|
];
|
|
434
|
-
variables
|
|
423
|
+
yield* wrapForEach(variables, function* warpForEachGenerator(variable) {
|
|
435
424
|
if (!advanceMap.get(variable)) {
|
|
436
425
|
code += `${indent((state?.tabSize || 0) + 1)}let `;
|
|
437
|
-
code += variable.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
426
|
+
code += yield* variable.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
438
427
|
code += ';\n';
|
|
439
428
|
}
|
|
440
429
|
});
|
|
441
|
-
|
|
442
|
-
advanceMap.forEach((assignment, node) => {
|
|
430
|
+
yield* wrapIterator(advanceMap.entries(), function* warpForEachGenerator([node, assignment]) {
|
|
443
431
|
code += `${indent((state?.tabSize || 0) + 1)}// @ts-ignore\n`;
|
|
444
432
|
code += `${indent((state?.tabSize || 0) + 1)}let `;
|
|
445
|
-
code += node.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
433
|
+
code += yield* node.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
446
434
|
if (assignment instanceof BatchAssignment) {
|
|
447
|
-
assignment.assignmentLines
|
|
435
|
+
yield* wrapForEach(assignment.assignmentLines, function* warpForEachGenerator({ leftIndex, rightIndex }) {
|
|
448
436
|
const leftCode =
|
|
449
437
|
leftIndex.length === 1
|
|
450
|
-
? assignment.left.expression.toEmbeddedTS(shiftState(state, code, { inline: true }))
|
|
451
|
-
: assignment.left.members[leftIndex[1]]?.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
438
|
+
? yield* assignment.left.expression.toEmbeddedTS(shiftState(state, code, { inline: true }))
|
|
439
|
+
: yield* assignment.left.members[leftIndex[1]]?.toEmbeddedTS(shiftState(state, code, { inline: true })) ?? returnOrigin('');
|
|
452
440
|
if (leftCode === node.name) {
|
|
453
441
|
const rightNode: any =
|
|
454
442
|
rightIndex.length === 1
|
|
@@ -460,11 +448,11 @@ export class AuthLogicForCallInterface extends AuthLogic {
|
|
|
460
448
|
!(rightNode instanceof CallQueryComponent && rightNode.ideVersion !== '2.11')
|
|
461
449
|
) {
|
|
462
450
|
code += ': ';
|
|
463
|
-
code += rightNode
|
|
451
|
+
code += yield* rightNode?.typeAnnotation?.toEmbeddedTS(shiftState(state, code, { inline: true })) ?? returnOrigin('null');
|
|
464
452
|
} else {
|
|
465
453
|
code += ' = ';
|
|
466
|
-
const rightCode = rightNode?.toEmbeddedTS(shiftState(state, code, { inline: true }))
|
|
467
|
-
code +=
|
|
454
|
+
const rightCode = yield* rightNode?.toEmbeddedTS(shiftState(state, code, { inline: true })) ?? returnOrigin('');;
|
|
455
|
+
code += yield* self.getRightCode(rightCode, assignment, rightNode);
|
|
468
456
|
}
|
|
469
457
|
}
|
|
470
458
|
});
|
|
@@ -474,14 +462,14 @@ export class AuthLogicForCallInterface extends AuthLogic {
|
|
|
474
462
|
) {
|
|
475
463
|
const rightNode: any = assignment.right;
|
|
476
464
|
code += ' = ';
|
|
477
|
-
code += rightNode.getInitCode(shiftState(state, code, { inline: true }));
|
|
465
|
+
code += yield* rightNode.getInitCode(shiftState(state, code, { inline: true }));
|
|
478
466
|
} else if (
|
|
479
467
|
assignment.right?.concept === 'NewComposite' &&
|
|
480
468
|
(assignment.right as any)?.typeAnnotation?.typeKind === 'anonymousStructure'
|
|
481
469
|
) {
|
|
482
470
|
const rightNode: any = assignment.right;
|
|
483
471
|
code += ' = ';
|
|
484
|
-
code += rightNode.getInitCode(shiftState(state, code, { inline: true }));
|
|
472
|
+
code += yield* rightNode.getInitCode(shiftState(state, code, { inline: true }));
|
|
485
473
|
} else {
|
|
486
474
|
const rightNode: any = assignment.right;
|
|
487
475
|
// 当右边有明确类型时,直接使用其类型。旧版本数据查询不能直接使用其 typeAnnotation
|
|
@@ -490,7 +478,7 @@ export class AuthLogicForCallInterface extends AuthLogic {
|
|
|
490
478
|
!(rightNode instanceof CallQueryComponent && rightNode.ideVersion !== '2.11')
|
|
491
479
|
) {
|
|
492
480
|
code += ': ';
|
|
493
|
-
code += rightNode.typeAnnotation?.toEmbeddedTS(shiftState(state, code, { inline: true }))
|
|
481
|
+
code += yield* rightNode.typeAnnotation?.toEmbeddedTS(shiftState(state, code, { inline: true })) ?? returnOrigin('null');
|
|
494
482
|
} else {
|
|
495
483
|
code += ' = ';
|
|
496
484
|
let rightCode = '';
|
|
@@ -503,39 +491,33 @@ export class AuthLogicForCallInterface extends AuthLogic {
|
|
|
503
491
|
) {
|
|
504
492
|
rightCode += 'new ';
|
|
505
493
|
}
|
|
506
|
-
rightCode +=
|
|
507
|
-
|
|
508
|
-
? rightNode.toEmbeddedTS(shiftState(state, code, { inline: true }))
|
|
509
|
-
: '__RIGHT__';
|
|
510
|
-
code += this.getRightCode(rightCode, assignment, rightNode);
|
|
494
|
+
rightCode += yield* rightNode?.toEmbeddedTS?.(shiftState(state, code, { inline: true })) ?? returnOrigin('__RIGHT__');
|
|
495
|
+
code += yield* self.getRightCode(rightCode, assignment, rightNode);
|
|
511
496
|
}
|
|
512
497
|
}
|
|
513
498
|
code += ';\n';
|
|
514
499
|
});
|
|
515
|
-
|
|
516
|
-
if (!this.body.length) {
|
|
500
|
+
if (!self.body.length) {
|
|
517
501
|
// 必有返回值,且返回值为 api 对应的返回参数
|
|
518
|
-
code += `${indent((state?.tabSize || 0) + 1)}let ${
|
|
502
|
+
code += `${indent((state?.tabSize || 0) + 1)}let ${self.name}Result: ApiReturn; \n ${indent(
|
|
519
503
|
(state?.tabSize || 0) + 1,
|
|
520
|
-
)}return ${
|
|
504
|
+
)}return ${self.name}Result;\n`;
|
|
521
505
|
} else {
|
|
522
506
|
// 如果长度小于2 并且不是虚拟节点就 加 报错,
|
|
523
|
-
if (
|
|
507
|
+
if (self.body.length <= 2 && !(self.parentNode instanceof Namespace)) {
|
|
524
508
|
code += indent((state?.tabSize || 0) + 1);
|
|
525
509
|
code += 'const __LogicEmpty: any = null;';
|
|
526
510
|
}
|
|
527
|
-
|
|
528
|
-
code +=
|
|
511
|
+
yield* wrapForEach(self.body, function* warpForEachGenerator(item) {
|
|
512
|
+
code += yield* item.toEmbeddedTS?.(shiftState(state, code, { tabSize: (state?.tabSize || 0) + 1 })) ?? returnOrigin('') ?? returnOrigin('');
|
|
529
513
|
code += ';\n';
|
|
530
514
|
});
|
|
531
515
|
}
|
|
532
|
-
|
|
533
516
|
// 在body渲染完成之后把其余的节点放到下面
|
|
534
|
-
|
|
535
|
-
code += item.toEmbeddedTS(shiftState(state, code, { tabSize: (state?.tabSize || 0) + 1 }));
|
|
517
|
+
yield* wrapForEach(self.playground, function* warpForEachGenerator(item) {
|
|
518
|
+
code += yield* item.toEmbeddedTS(shiftState(state, code, { tabSize: (state?.tabSize || 0) + 1 }));
|
|
536
519
|
code += ';\n';
|
|
537
520
|
});
|
|
538
|
-
|
|
539
521
|
code += `${indent(state?.tabSize || 0)}}`;
|
|
540
522
|
if (prefix === 'inObject') {
|
|
541
523
|
code += `,`;
|
|
@@ -1,5 +1,15 @@
|
|
|
1
|
+
import type { EmbeddedTSFileGenerator } from '../utils';
|
|
1
2
|
import { dataTypesMap } from './basics/types';
|
|
2
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
TranslatorState,
|
|
5
|
+
shiftState,
|
|
6
|
+
withSourceMap,
|
|
7
|
+
indent,
|
|
8
|
+
createCompilerState,
|
|
9
|
+
withSourceMapGenerator,
|
|
10
|
+
withGenerator,
|
|
11
|
+
TranslatorGenerator,
|
|
12
|
+
} from '../translator';
|
|
3
13
|
import { ElementToVueOptions } from './ViewElement__';
|
|
4
14
|
import EntityProperty from './EntityProperty__';
|
|
5
15
|
import StructureProperty from './StructureProperty__';
|
|
@@ -233,9 +243,12 @@ export class BackendVariable extends BaseNode {
|
|
|
233
243
|
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
234
244
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
235
245
|
params.index = index;
|
|
236
|
-
} else
|
|
237
|
-
|
|
238
|
-
(
|
|
246
|
+
} else {
|
|
247
|
+
const q = (t as any)[parentKey];
|
|
248
|
+
if ((q.__v_raw || q) === n) {
|
|
249
|
+
params.index = 0;
|
|
250
|
+
(this as any)[parentKey] = undefined;
|
|
251
|
+
}
|
|
239
252
|
}
|
|
240
253
|
}
|
|
241
254
|
return params;
|
|
@@ -313,18 +326,19 @@ export class BackendVariable extends BaseNode {
|
|
|
313
326
|
return code;
|
|
314
327
|
}
|
|
315
328
|
|
|
316
|
-
@
|
|
317
|
-
toEmbeddedTS(state = createCompilerState()):
|
|
318
|
-
|
|
319
|
-
|
|
329
|
+
@withSourceMapGenerator
|
|
330
|
+
*toEmbeddedTS(state = createCompilerState()): TranslatorGenerator {
|
|
331
|
+
const self = this;
|
|
332
|
+
let code = self.name;
|
|
333
|
+
if (self.typeAnnotation) {
|
|
320
334
|
code += ': ';
|
|
321
|
-
code +=
|
|
335
|
+
code += yield* self.typeAnnotation.toEmbeddedTS(shiftState(state, code));
|
|
322
336
|
// toTS暂时只需要翻译引用数据类型的,因为值都是字符串
|
|
323
337
|
// 就不在这里赋值了,这里单纯就为了快速查找
|
|
324
338
|
// 并且屏蔽了一些异常的错误
|
|
325
|
-
if (
|
|
326
|
-
if (
|
|
327
|
-
code += `= ${
|
|
339
|
+
if (self.typeAnnotation?.typeKind !== 'primitive' && self.defaultValue) {
|
|
340
|
+
if (self.isEnum()) {
|
|
341
|
+
code += `= ${self.typeAnnotation.typeKey}['${self.defaultValue}']`;
|
|
328
342
|
}
|
|
329
343
|
}
|
|
330
344
|
}
|
|
@@ -363,12 +377,12 @@ export class BackendVariable extends BaseNode {
|
|
|
363
377
|
throw new Error('无法获取命名空间,请设置 parentNode!');
|
|
364
378
|
}
|
|
365
379
|
|
|
366
|
-
toEmbeddedTSFile() {
|
|
380
|
+
*toEmbeddedTSFile(): EmbeddedTSFileGenerator {
|
|
367
381
|
let code = `namespace ${this.getNamespace()} {\n`;
|
|
368
382
|
code += `${indent(1)}export let `;
|
|
369
383
|
const state = createCompilerState(code, { tabSize: 1 });
|
|
370
384
|
try {
|
|
371
|
-
code += `${this.toEmbeddedTS(state)}\n`;
|
|
385
|
+
code += `${yield* this.toEmbeddedTS(state)}\n`;
|
|
372
386
|
} catch (err) {
|
|
373
387
|
code += '\n';
|
|
374
388
|
}
|
|
@@ -381,12 +395,13 @@ export class BackendVariable extends BaseNode {
|
|
|
381
395
|
};
|
|
382
396
|
}
|
|
383
397
|
|
|
384
|
-
@
|
|
385
|
-
toEmbeddedTSInProcess(state
|
|
386
|
-
|
|
387
|
-
|
|
398
|
+
@withSourceMapGenerator
|
|
399
|
+
*toEmbeddedTSInProcess(state = createCompilerState()): TranslatorGenerator {
|
|
400
|
+
const self = this;
|
|
401
|
+
let code = self.name;
|
|
402
|
+
if (self.typeAnnotation) {
|
|
388
403
|
code += ': undefined as ';
|
|
389
|
-
code +=
|
|
404
|
+
code += yield* self.typeAnnotation.toEmbeddedTS(shiftState(state, code));
|
|
390
405
|
}
|
|
391
406
|
// if (this.defaultValue) {
|
|
392
407
|
// code += `: ${this.defaultValue}`;
|
|
@@ -1,5 +1,21 @@
|
|
|
1
|
+
import type { EmbeddedTSFileGenerator } from '../utils';
|
|
1
2
|
import Namespace from './Namespace__';
|
|
2
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
TranslatorState,
|
|
5
|
+
shiftState,
|
|
6
|
+
withSourceMap,
|
|
7
|
+
indent,
|
|
8
|
+
createCompilerState,
|
|
9
|
+
withSourceMapGenerator,
|
|
10
|
+
withGenerator,
|
|
11
|
+
TranslatorGenerator,
|
|
12
|
+
} from '../translator';
|
|
13
|
+
|
|
14
|
+
interface TsFileData {
|
|
15
|
+
code: string;
|
|
16
|
+
filePath: string;
|
|
17
|
+
sourceMap: any;
|
|
18
|
+
}
|
|
3
19
|
|
|
4
20
|
//================================================================================
|
|
5
21
|
// 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
|
|
@@ -92,7 +108,7 @@ export class Backend extends BaseNode {
|
|
|
92
108
|
const excludedSet = new Set(excludedList);
|
|
93
109
|
return ((this.variables as BackendVariable[]) || [])
|
|
94
110
|
.filter((item) => !excludedSet.has(item))
|
|
95
|
-
.map((item) => item
|
|
111
|
+
.map((item) => item?.name);
|
|
96
112
|
}
|
|
97
113
|
getBackendVariableUniqueName(name = 'backendVariable1') {
|
|
98
114
|
return utils.unique(name, this.getVarExistingNames(), undefined, true);
|
|
@@ -284,12 +300,16 @@ export class Backend extends BaseNode {
|
|
|
284
300
|
// @ts-ignore
|
|
285
301
|
const n = backendVariable.__v_raw || backendVariable;
|
|
286
302
|
if (Array.isArray((t as any)[parentKey])) {
|
|
287
|
-
|
|
303
|
+
// @ts-ignore
|
|
304
|
+
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
288
305
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
289
306
|
params.index = index;
|
|
290
|
-
} else
|
|
291
|
-
|
|
292
|
-
(
|
|
307
|
+
} else {
|
|
308
|
+
const q = (t as any)[parentKey];
|
|
309
|
+
if ((q.__v_raw || q) === n) {
|
|
310
|
+
params.index = 0;
|
|
311
|
+
(this as any)[parentKey] = undefined;
|
|
312
|
+
}
|
|
293
313
|
}
|
|
294
314
|
}
|
|
295
315
|
return params;
|
|
@@ -320,11 +340,12 @@ export class Backend extends BaseNode {
|
|
|
320
340
|
return `/embedded/${this.rootNode?.name || this.parentNode.name}/Backend/backend.ts`;
|
|
321
341
|
}
|
|
322
342
|
|
|
323
|
-
@
|
|
324
|
-
toEmbeddedTS(state = createCompilerState()):
|
|
325
|
-
|
|
343
|
+
@withSourceMapGenerator
|
|
344
|
+
*toEmbeddedTS(state = createCompilerState()): TranslatorGenerator {
|
|
345
|
+
const self = this;
|
|
346
|
+
let code = `export namespace ${self.name} {\n`;
|
|
326
347
|
code += 'const name = ';
|
|
327
|
-
code += `"${
|
|
348
|
+
code += `"${self.name}";\n`;
|
|
328
349
|
code += '}\n';
|
|
329
350
|
return code;
|
|
330
351
|
}
|
|
@@ -334,12 +355,12 @@ export class Backend extends BaseNode {
|
|
|
334
355
|
// const finalPath = path && path !== '/' ? path : '';
|
|
335
356
|
// return finalPath;
|
|
336
357
|
// }
|
|
337
|
-
toEmbeddedTSFile() {
|
|
358
|
+
*toEmbeddedTSFile(): EmbeddedTSFileGenerator {
|
|
338
359
|
let code = `namespace ${this.getNamespace()} {\n`;
|
|
339
360
|
|
|
340
361
|
const state = createCompilerState(code, { tabSize: 1 });
|
|
341
362
|
try {
|
|
342
|
-
code += this.toEmbeddedTS(state);
|
|
363
|
+
code += yield* this.toEmbeddedTS(state);
|
|
343
364
|
} catch (err) {
|
|
344
365
|
code += '';
|
|
345
366
|
console.log(err);
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { wrapForEachToGenerator as wrapForEach, returnOrigin } from '../utils/time-slicing';
|
|
2
|
+
import {
|
|
3
|
+
TranslatorState,
|
|
4
|
+
shiftState,
|
|
5
|
+
withSourceMap,
|
|
6
|
+
createCompilerState,
|
|
7
|
+
withSourceMapGenerator,
|
|
8
|
+
withGenerator,
|
|
9
|
+
TranslatorGenerator,
|
|
10
|
+
} from '../translator';
|
|
2
11
|
import { ElementToVueOptions } from './ViewElement__';
|
|
3
12
|
import MemberExpression from './MemberExpression__';
|
|
4
13
|
import Assignment from './Assignment__';
|
|
@@ -507,9 +516,12 @@ export class BatchAssignment extends LogicItem {
|
|
|
507
516
|
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
508
517
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
509
518
|
params.index = index;
|
|
510
|
-
} else
|
|
511
|
-
|
|
512
|
-
(
|
|
519
|
+
} else {
|
|
520
|
+
const q = (t as any)[parentKey];
|
|
521
|
+
if ((q.__v_raw || q) === n) {
|
|
522
|
+
params.index = 0;
|
|
523
|
+
(this as any)[parentKey] = undefined;
|
|
524
|
+
}
|
|
513
525
|
}
|
|
514
526
|
}
|
|
515
527
|
return params;
|
|
@@ -560,9 +572,12 @@ export class BatchAssignment extends LogicItem {
|
|
|
560
572
|
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
561
573
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
562
574
|
params.index = index;
|
|
563
|
-
} else
|
|
564
|
-
|
|
565
|
-
(
|
|
575
|
+
} else {
|
|
576
|
+
const q = (t as any)[parentKey];
|
|
577
|
+
if ((q.__v_raw || q) === n) {
|
|
578
|
+
params.index = 0;
|
|
579
|
+
(this as any)[parentKey] = undefined;
|
|
580
|
+
}
|
|
566
581
|
}
|
|
567
582
|
}
|
|
568
583
|
return params;
|
|
@@ -1009,47 +1024,50 @@ export class BatchAssignment extends LogicItem {
|
|
|
1009
1024
|
return code;
|
|
1010
1025
|
}
|
|
1011
1026
|
|
|
1012
|
-
@
|
|
1013
|
-
toEmbeddedTS(state = createCompilerState()):
|
|
1027
|
+
@withSourceMapGenerator
|
|
1028
|
+
*toEmbeddedTS(state = createCompilerState()): TranslatorGenerator {
|
|
1029
|
+
const self = this;
|
|
1014
1030
|
let code = '// 以下是批量赋值的翻译代码\n';
|
|
1015
1031
|
// 提供sourcemap,获取类型标注和上下文可选变量
|
|
1016
|
-
code +=
|
|
1017
|
-
? `${
|
|
1032
|
+
code += self.left.expression
|
|
1033
|
+
? `${yield* self.left.expression.toEmbeddedTS(shiftState(state, code, { inline: true }))}`
|
|
1018
1034
|
: '';
|
|
1019
1035
|
code += ';\n';
|
|
1020
|
-
|
|
1021
|
-
code += member.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
1036
|
+
yield* wrapForEach(self.left.members, function* warpForEachGenerator(member) {
|
|
1037
|
+
code += yield* member.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
1022
1038
|
code += '; ';
|
|
1023
1039
|
});
|
|
1024
1040
|
code += '\n';
|
|
1025
|
-
|
|
1026
|
-
code += `${right.expression.toEmbeddedTS(shiftState(state, code, { inline: true }))}`;
|
|
1041
|
+
yield* wrapForEach(self.rights, function* warpForEachGenerator(right) {
|
|
1042
|
+
code += `${yield* right.expression.toEmbeddedTS(shiftState(state, code, { inline: true }))}`;
|
|
1027
1043
|
code += ';\n';
|
|
1028
|
-
right.members
|
|
1029
|
-
code += member.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
1044
|
+
yield* wrapForEach(right.members, function* warpForEachGenerator(member) {
|
|
1045
|
+
code += yield* member.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
1030
1046
|
code += '; ';
|
|
1031
1047
|
});
|
|
1032
1048
|
code += right.members.length ? '\n' : '';
|
|
1033
1049
|
});
|
|
1034
1050
|
// 根据连线状态,拆分成多个单赋值
|
|
1035
|
-
|
|
1051
|
+
yield* wrapForEach(self.assignmentLines, function* warpForEachGenerator({ leftIndex, rightIndex }) {
|
|
1036
1052
|
code += 'nasl.core.assign(';
|
|
1037
1053
|
const leftValue =
|
|
1038
1054
|
leftIndex.length === 1
|
|
1039
|
-
?
|
|
1040
|
-
:
|
|
1055
|
+
? yield* self.left.expression.toEmbeddedTS(shiftState(state, code, { inline: true }))
|
|
1056
|
+
: yield* self.left.members[leftIndex[1]]?.toEmbeddedTS(shiftState(state, code, { inline: true })) ?? returnOrigin('');
|
|
1041
1057
|
code += `${leftValue}`;
|
|
1042
1058
|
code += ', ';
|
|
1043
1059
|
const rightValue =
|
|
1044
1060
|
rightIndex.length === 1
|
|
1045
|
-
?
|
|
1046
|
-
:
|
|
1061
|
+
? yield* self.rights[rightIndex[0]]?.expression?.toEmbeddedTS(shiftState(state, code, { inline: true })) ?? returnOrigin('')
|
|
1062
|
+
: yield* self.rights[rightIndex[0]]?.members[rightIndex[1]]?.toEmbeddedTS(
|
|
1063
|
+
shiftState(state, code, { inline: true }),
|
|
1064
|
+
) ?? returnOrigin('');
|
|
1047
1065
|
code += `${rightValue}`;
|
|
1048
1066
|
code += ')';
|
|
1049
1067
|
code += ';';
|
|
1050
1068
|
code += '\n';
|
|
1051
1069
|
});
|
|
1052
|
-
if (!
|
|
1070
|
+
if (!self.assignmentLines.length) code += `__assignmentLineEmpty__\n`;
|
|
1053
1071
|
code += '// 批量赋值的翻译代码结束---------\n';
|
|
1054
1072
|
return code;
|
|
1055
1073
|
}
|