genius257 / autoit3-pegjs

A PEG.js parser for the AutoIt3 language

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

scope string value in VariableDeclarations and EnumDeclarations should be lowercase

genius257 opened this issue · comments

scope property strings in AST objects for VariableDeclaration and EnumDeclaration, have the casing from the extracted string preserved.
This gives no benefit and conversion to lower string is needed for basic match checks.
A good solution is just to make it lower case when extracting the string.

scope: extractOptional(scope, 0),

scope: extractOptional(scope, 0),

scope: extractOptional(scope, 0),

A possible fix is to add: ?.toLowerCase() on the extractOptional call.

An update for the ts file should also reflect this improvement.