You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Multiple Statements in one line using colons are not treated like block statements:
Currently:
IfErrThenMsgBox"Can't open ""core.vbs""":ExitSub
renders:
if(Err)MsgBox('Can\'t open "core.vbs"');return;
This was fixed in scripting/ebnf and merged into master.
Check how OR should be rendered.
Currently:
IfVPBuildVersion<0OrErrThenx=5EndIf
renders:
if(VPBuildVersion<0|Err){x=5;}
This was fixed in scripting/ebnf as a logical or expression (||) and merged into master.
Implement classes and properties: ClassDecl, MemberDeclList, MemberDecl, PropertyDecl, and PropertyAccessType
JavaScript has classes but does not support fields.
Classes were implemented in scripting/ebnf and merged into master. ProperyDecl's were implemented as methods.
Properly support array vs call. For example:
Controller.Switch(swLRFlip)=True
should probably render in JavaScript:
Controller.Switch[swLRFlip]=true;
Do we need to make a second pass, to grab a collection of all variables in relation to their position on the stack. If we find a subcall that matches a variable name, switch statement to array
This was implemented in scripting/ebnf and merged into master.
result(0, 0, 0) = 42 --> _scope.result[0][0][0] = 42
Replace Id that might match JavaScript keywords.
For example, does Switch cause issues?
You could do a second pass, and all identifiers that match keywords, auto append something
or
maybe it can altered directly in the id helper post processor?
No updates were made as this does not seem to be an issue.
Correctly implement ByRef & ByVal.
Currently these are just ignored. In JavaScript, only objects are passed by reference
Redim needs to be fixed. Redim does not first require a Dim. Should we make a second pass and look for any previous Dim or additional Redim and change to assignment statements.
This was implemented in scripting/ebnf and merged into master.
redim is no longer implemented as variable declaration.
Fields need to be really implemented Default, Erase, Error, Explicit, Step, Private, Public
These were implemented in scripting/ebnf and merged into master.
Step is a keyword in Visual Basic, but not VBScript. Option Explicit is ignored and only allowed as first line in program. Erase has been implemented as a dim`
Error statements need to be really implemented
Currently they are just rendered as comments:
;// On Error Resume Next
**This was implemented in scripting/ebnf and merged into master.
Special character will break the parser
Currently WPC.vbs contains 0x93 and 0x94 in a comment:
'Everytime you press the flipper keys those switches are <93>on<94>,
This was implemented in scripting/ebnf and merged into master. The parser is now based on node-ebnf. The program is first parsed into tokens (as per microsoft docs), formatted, and then standardized.
Sometimes whitespace will lock up the parser
Example:
a.b(1).c(2)(3).d(4,5)
should render as:
a.b(1).c(2,3).d(4,5)
This was implemented in scripting/ebnf and merged into master. Related to above, after the script if formatted and standardized, no extra whitespace is present.
Currently implement Nothing vs Null vs Empty literals.
Currently all are rendered as null
This was implemented in scripting/ebnf and merged into master. Nothing, Null, and Empty now have __stdlib members that represent null and undefined.
Implement 3 remaining SubCallStmt in grammar, and determine how SubSafeExprOpt is meant to be used
This was fixed in scripting/ebnf and merged into master. Since the parser is now based on EBNF and microsoft specs, this is no longer relevant. See InvocationExpression and InvocationMemberAccessExpression
Implement CallStmt in grammar
This was fixed in scripting/ebnf and merged into master.
Fix Date literal. This may require a vbsHelper function because according to
Currently:
renders:
This was fixed in
scripting/ebnf
and merged intomaster
.Currently:
renders:
This was fixed in
scripting/ebnf
as a logical or expression (||
) and merged intomaster
.ClassDecl
,MemberDeclList
,MemberDecl
,PropertyDecl
, andPropertyAccessType
JavaScript has
classes
but does not supportfields
.Classes were implemented in
scripting/ebnf
and merged intomaster
. ProperyDecl's were implemented as methods.array
vscall
. For example:should probably render in JavaScript:
Do we need to make a second pass, to grab a collection of all variables in relation to their position on the stack. If we find a
subcall
that matches a variable name, switch statement toarray
This was implemented in
scripting/ebnf
and merged intomaster
.result(0, 0, 0) = 42 --> _scope.result[0][0][0] = 42
Id
that might match JavaScript keywords.For example, does
Switch
cause issues?You could do a second pass, and all identifiers that match keywords, auto append something
or
maybe it can altered directly in the
id
helper post processor?No updates were made as this does not seem to be an issue.
ByRef
&ByVal
.Currently these are just ignored. In JavaScript, only objects are passed by reference
Redim
needs to be fixed.Redim
does not first require aDim
. Should we make a second pass and look for any previousDim
or additionalRedim
and change to assignment statements.Currently:
renders:
And would fail with:
This was implemented in
scripting/ebnf
and merged intomaster
.redim is no longer implemented as variable declaration.
Default
,Erase
,Error
,Explicit
,Step
,Private
,Public
These were implemented in
scripting/ebnf
and merged intomaster
.Step is a keyword in Visual Basic, but not VBScript. Option Explicit is ignored and only allowed as first line in program. Erase has been implemented as a dim`
Currently they are just rendered as comments:
**This was implemented in
scripting/ebnf
and merged intomaster
.Currently
WPC.vbs
contains 0x93 and 0x94 in a comment:'Everytime you press the flipper keys those switches are <93>on<94>,
This was implemented in
scripting/ebnf
and merged intomaster
. The parser is now based on node-ebnf. The program is first parsed into tokens (as per microsoft docs), formatted, and then standardized.Example:
should render as:
This was implemented in
scripting/ebnf
and merged intomaster
. Related to above, after the script if formatted and standardized, no extra whitespace is present.Nothing
vsNull
vsEmpty
literals.Currently all are rendered as
null
This was implemented in
scripting/ebnf
and merged intomaster
. Nothing, Null, and Empty now have __stdlib members that represent null and undefined.SubCallStmt
in grammar, and determine howSubSafeExprOpt
is meant to be usedNeed to confirm, but I believe
IndexOrParamsListDot
vsIndexOrParamsList %dot
was intended to allow for whitespacea.b(1). c(2, 3)
This was fixed in
scripting/ebnf
and merged intomaster
. Since the parser is now based on EBNF and microsoft specs, this is no longer relevant.LeftExpr
andLeftExprTail
These are required for multiple object subcalls:
that renders as:
ie, should
ReadAll
beReadAll()
?This was fixed in
scripting/ebnf
and merged intomaster
. Since the parser is now based on EBNF and microsoft specs, this is no longer relevant. See InvocationExpression and InvocationMemberAccessExpressionCallStmt
in grammarThis was fixed in
scripting/ebnf
and merged intomaster
.Date
literal. This may require avbsHelper
function because according tohttp://www.herongyang.com/VBScript/Data-Type-Date-and-Time-Data-Literal.html
You can just do a time portion:
#21:26:00#
**This was fixed in
scripting/ebnf
and merged intomaster
. Since the parser is now based on microsoft specs, the date grammar is accurate. **KeywordID
andSafeKeywordID
in the Rosetta Code grammar is trying to doThis was fixed in
scripting/ebnf
and merged intomaster
. Since the parser is now based on EBNF and microsoft specs, this is no longer relevant.Imp
logical implication function. This will need to be done as avbsHelper
as javascript does not have this built in:https://www.promotic.eu/en/pmdoc/ScriptLangs/VBScript/Operat/Imp.htm
This was fixed in
scripting/ebnf
and merged intomaster
. Since the parser is now based on EBNF and microsoft specs, this is no longer relevant.renders as:
This was fixed in
scripting/ebnf
and merged intomaster
. Since the parser first formats the script all line continuations merged into one line.NOT
does on integer literals.Do we need to implement
~
in certain cases?This was fixed in
scripting/ebnf
and merged intomaster
. Not was implemented as !This was fixed in
scripting/ebnf
and merged intomaster
. Since the parser is now EBNF based, this is no longer an issue.The text was updated successfully, but these errors were encountered: