@lcap/nasl-translator
Advanced tools
Comparing version 3.9.1-beta.25 to 3.9.1-beta.26
@@ -37,8 +37,4 @@ "use strict"; | ||
} | ||
if (isNatural && state.focusedNodePath) { | ||
if (isNatural && state.focusedNodePath && !state.focusedSlotPosition) { | ||
const needAddComment = this.nodePath === state.focusedNodePath; | ||
// if (!needAddComment) { | ||
// const parts = state.focusedNodePath.split('.'); | ||
// const lastPart = parts.pop(); | ||
// } | ||
if (needAddComment) { | ||
@@ -45,0 +41,0 @@ const beforeComment = `/* 当前位置 */\n${before}`; |
@@ -26,2 +26,3 @@ import type { Translator, Concept } from '@lcap/nasl-types'; | ||
export declare function createDescriptionComment<T extends Concept.BaseNode>(state: Translator.TranslatorState, node: T, properties: Array<keyof T>): string; | ||
export declare function createSlotPositionMark<T extends Concept.BaseNode>(state: Translator.TranslatorState, node: T, slotPosition: string): string; | ||
//# sourceMappingURL=utils.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createDescriptionComment = exports.textualNamespace = exports.createIdentifierCode = exports.createDecoratorCode = exports.isSameRange = exports.shiftState = exports.shiftPosition = exports.createCompilerState = exports.padRemainLeft = exports.indent = exports.lsp2tspNumber = void 0; | ||
exports.createSlotPositionMark = exports.createDescriptionComment = exports.textualNamespace = exports.createIdentifierCode = exports.createDecoratorCode = exports.isSameRange = exports.shiftState = exports.shiftPosition = exports.createCompilerState = exports.padRemainLeft = exports.indent = exports.lsp2tspNumber = void 0; | ||
function lsp2tspNumber(num) { | ||
@@ -122,2 +122,10 @@ return num + 1; | ||
exports.createDescriptionComment = createDescriptionComment; | ||
function createSlotPositionMark(state, node, slotPosition) { | ||
let code = ''; | ||
if (state.focusedSlotPosition === slotPosition && node.nodePath === state.focusedNodePath) { | ||
code += `/* 当前位置 */`; | ||
} | ||
return code; | ||
} | ||
exports.createSlotPositionMark = createSlotPositionMark; | ||
//# sourceMappingURL=utils.js.map |
{ | ||
"name": "@lcap/nasl-translator", | ||
"description": "NetEase Application Specific Language", | ||
"version": "3.9.1-beta.25", | ||
"version": "3.9.1-beta.26", | ||
"author": "Forrest <rainforest92@126.com>", | ||
@@ -19,4 +19,4 @@ "main": "./out", | ||
"@lcap/nasl-tsconfig": "1.0.1", | ||
"@lcap/nasl-types": "3.9.1-beta.25", | ||
"@lcap/nasl-utils": "3.9.1-beta.25" | ||
"@lcap/nasl-types": "3.9.1-beta.26", | ||
"@lcap/nasl-utils": "3.9.1-beta.26" | ||
}, | ||
@@ -23,0 +23,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26303
350
+ Added@lcap/nasl-types@3.9.1-beta.26(transitive)
+ Added@lcap/nasl-utils@3.9.1-beta.26(transitive)
- Removed@lcap/nasl-types@3.9.1-beta.25(transitive)
- Removed@lcap/nasl-utils@3.9.1-beta.25(transitive)