1
0
mirror of https://github.com/sasjs/lint.git synced 2026-01-09 05:20:06 +00:00

chore(*): rename macro properties

This commit is contained in:
Krishna Acondy
2021-04-21 15:10:28 +01:00
parent 060b838f21
commit abc2f75dc0
4 changed files with 38 additions and 40 deletions

View File

@@ -6,10 +6,10 @@ interface Macro {
name: string
startLineNumber: number | null
endLineNumber: number | null
declarationLine: string
terminationLine: string
declaration: string
termination: string
declarationTrimmedStatement: string
terminationTrimmedStatement: string
parentMacro: string
hasMacroNameInMend: boolean
hasParentheses: boolean
@@ -54,10 +54,10 @@ export const parseMacros = (text: string, config?: LintConfig): Macro[] => {
hasParentheses: trimmedStatement.endsWith('()'),
hasMacroNameInMend: false,
mismatchedMendMacroName: '',
declaration: line,
termination: '',
declarationTrimmedStatement: trimmedStatement,
terminationTrimmedStatement: ''
declarationLine: line,
terminationLine: '',
declaration: trimmedStatement,
termination: ''
})
} else if (trimmedStatement.startsWith('%mend')) {
if (macroStack.length) {
@@ -69,8 +69,8 @@ export const parseMacros = (text: string, config?: LintConfig): Macro[] => {
macro.mismatchedMendMacroName = macro.hasMacroNameInMend
? ''
: mendMacroName
macro.termination = line
macro.terminationTrimmedStatement = trimmedStatement
macro.terminationLine = line
macro.termination = trimmedStatement
macros.push(macro)
} else {
macros.push({
@@ -81,10 +81,10 @@ export const parseMacros = (text: string, config?: LintConfig): Macro[] => {
hasParentheses: false,
hasMacroNameInMend: false,
mismatchedMendMacroName: '',
declarationLine: '',
terminationLine: line,
declaration: '',
termination: line,
declarationTrimmedStatement: '',
terminationTrimmedStatement: trimmedStatement
termination: trimmedStatement
})
}
}