Skip to content

Commit

Permalink
doIt('if(v<>"W")','if(v!="W")') ; #13
Browse files Browse the repository at this point in the history
  • Loading branch information
FuPeiJiang committed Jun 25, 2021
1 parent d4d293f commit 13bd696
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mocha/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ describe('toV2(text)',function() {
doItFiles('../tests3/v1assign with whiteSpace then nothing.ahk','correct/v1assign with whiteSpace then nothing.ah2')
doItFiles('../tests3/Renamed variables.ahk','correct/Renamed variables.ah2')
doItFiles('../tests3/elseTryFinally.ahk','correct/elseTryFinally.ah2')
doIt('if(v<>"W")','if(v!="W")')

})

function toV2(text) {
Expand Down
2 changes: 2 additions & 0 deletions src/modifyEverythingToV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,8 @@ export default (everything: ExtendedEverythingType): string => {
}
thisE.text = `${noNeedToWhiteSpaceForConcat[everything[i - 1].text.slice(-1)] ? '' : ' '}"${theText.replace(/"/g,'`"')}"${putAtEnd}`
}
} else if (thisE.text === '<>' && eType === '2operator') {
thisE.text = '!='
} else if (eType === '= v1Assignment') {
thisE.text = ':='
let next = everything[++i]
Expand Down

0 comments on commit 13bd696

Please sign in to comment.