@@ -187,7 +187,7 @@ Compiler_MainLoop:
187187 Next j
188188 Else
189189 ReDim pa(0 To 0 )
190- pa(0 ) = ""
190+ pa(0 ) = vbNullString
191191 End If
192192 GLOBALS_.gFuncParams.Add fname, pa
193193
@@ -520,7 +520,7 @@ Private Function ParseStatementTokensToAST(stmtTokens As Collection) As ASF_Map
520520
521521 ' assignment: find top-level "=" operator position or compound-assignment like "+=", "-=", "*=", etc.
522522 Dim assignPos As Long : assignPos = 0
523- Dim compoundOp As String : compoundOp = ""
523+ Dim compoundOp As String : compoundOp = vbNullString
524524 Dim ii As Long
525525 Dim depthB As Long , depthP As Long , depthBr As Long
526526 For ii = 1 To stmtTokens.count
@@ -583,7 +583,7 @@ Private Function ParseStatementTokensToAST(stmtTokens As Collection) As ASF_Map
583583 End If
584584
585585 Dim rhsNode As ASF_Map
586- If compoundOp <> "" Then
586+ If compoundOp <> vbNullString Then
587587 ' For compound assignments like "a += 3" produce:
588588 ' Assign { left: lhsNode, right: Binary { left: (clone of lhsNode), op: <op>, right: <rhsExpr> } }
589589 Dim innerOp As String : innerOp = left$(compoundOp, Len(compoundOp) - 1 )
@@ -1283,7 +1283,7 @@ Private Function ParsePrimaryNode(types() As String, vals() As Variant, n As Lon
12831283 Dim s As String : s = CStr(name)
12841284 Dim poss As Long : poss = 1
12851285 Dim L As Long : L = Len(s)
1286- Dim ident As String : ident = ""
1286+ Dim ident As String : ident = vbNullString
12871287 Dim propName As String
12881288
12891289 ' read leading ident
@@ -1301,7 +1301,7 @@ Private Function ParsePrimaryNode(types() As String, vals() As Variant, n As Lon
13011301 Dim ch As String : ch = mid$(s, poss, 1 )
13021302 If ch = "." Then
13031303 poss = poss + 1
1304- propName = ""
1304+ propName = vbNullString
13051305 Do While poss <= L
13061306 Dim ch2 As String : ch2 = mid$(s, poss, 1 )
13071307 If ch2 = "." Or ch2 = "[" Then Exit Do
@@ -1806,7 +1806,7 @@ Private Function ParseForAST(stmtTokens As Collection) As ASF_Map
18061806
18071807 ' Try to detect "for (<left> in <right>)" or "for (<left> of <right>)"
18081808 Dim foundPos As Long : foundPos = 0
1809- Dim foundKind As String : foundKind = ""
1809+ Dim foundKind As String : foundKind = vbNullString
18101810 If initTok.count > 0 Then
18111811 Dim depthP As Long : depthP = 0
18121812 Dim depthB As Long : depthB = 0
@@ -2384,7 +2384,6 @@ Private Function NormalizeNodeRecursive(node As ASF_Map) As ASF_Map
23842384 Dim initNode As ASF_Map
23852385 Dim condNode As ASF_Map
23862386 Dim stepNode As ASF_Map
2387- Dim body As Collection
23882387 Dim nInit As ASF_Map , nCond As ASF_Map , nStep As ASF_Map
23892388 Dim na As ASF_Map
23902389 Dim L As ASF_Map
@@ -2739,7 +2738,7 @@ Private Function ParseTemplateStringToNode(ByVal rawBacktickString As String) As
27392738 Dim parts As New Collection
27402739 Dim i As Long : i = 1
27412740 Dim Ls As Long : Ls = Len(inner)
2742- Dim curLit As String : curLit = ""
2741+ Dim curLit As String : curLit = vbNullString
27432742
27442743 Do While i <= Ls
27452744 Dim ch As String : ch = mid$(inner, i, 1 )
@@ -2756,7 +2755,7 @@ Private Function ParseTemplateStringToNode(ByVal rawBacktickString As String) As
27562755 Dim litNode As ASF_Map : Set litNode = MakeNode("Literal" )
27572756 litNode.SetValue "value" , curLit
27582757 parts.Add litNode
2759- curLit = ""
2758+ curLit = vbNullString
27602759 End If
27612760 ' capture expression until matching brace
27622761 i = i + 2
@@ -2777,7 +2776,7 @@ Private Function ParseTemplateStringToNode(ByVal rawBacktickString As String) As
27772776 Loop
27782777 Dim exprLen As Long : exprLen = i - exprStart - 1
27792778 Dim exprSrc As String
2780- If exprLen >= 0 Then exprSrc = mid$(inner, exprStart, exprLen) Else exprSrc = ""
2779+ If exprLen >= 0 Then exprSrc = mid$(inner, exprStart, exprLen) Else exprSrc = vbNullString
27812780 ' parse expression string to an AST node (reuse existing helper)
27822781 Dim exprNode As ASF_Map : Set exprNode = ParseExprFromStringToNode(exprSrc)
27832782 parts.Add exprNode
@@ -2817,7 +2816,7 @@ Private Function ParseTemplatePartsFromString(ByVal tokenStr As String) As Colle
28172816
28182817 Dim i As Long : i = 2 ' start after opening backtick
28192818 Dim Ls As Long : Ls = Len(tokenStr)
2820- Dim curLit As String : curLit = ""
2819+ Dim curLit As String : curLit = vbNullString
28212820 Dim ch As String
28222821 Dim nx As String
28232822 Dim curExpr As String
@@ -2848,7 +2847,7 @@ Private Function ParseTemplatePartsFromString(ByVal tokenStr As String) As Colle
28482847 ' flush current literal (outside placeholders)
28492848 If Len(curLit) > 0 Then
28502849 parts.Add Array("LITERAL" , curLit)
2851- curLit = ""
2850+ curLit = vbNullString
28522851 End If
28532852
28542853 ' consume "${"
@@ -2859,7 +2858,7 @@ Private Function ParseTemplatePartsFromString(ByVal tokenStr As String) As Colle
28592858 ' - backslash inside placeholder escapes the next char if equal to '{' or '$' or '}'
28602859 ' - unescaped "${" starts a nested split: flush current expr (if any) and start collecting nested
28612860 ' - unescaped "}" closes the *current* placeholder chunk and the collected text is added as an EXPR
2862- curExpr = ""
2861+ curExpr = vbNullString
28632862 depth = 1
28642863
28652864 Do While i <= Ls And depth > 0
@@ -2891,7 +2890,7 @@ Private Function ParseTemplatePartsFromString(ByVal tokenStr As String) As Colle
28912890 If c2 = "$" And i < Ls And mid$(tokenStr, i + 1 , 1 ) = "{" Then
28922891 If Len(curExpr) > 0 Then
28932892 parts.Add Array("EXPR" , curExpr)
2894- curExpr = ""
2893+ curExpr = vbNullString
28952894 End If
28962895 ' consume nested "${" and increase depth
28972896 depth = depth + 1
@@ -2907,7 +2906,7 @@ Private Function ParseTemplatePartsFromString(ByVal tokenStr As String) As Colle
29072906 ' only add non-empty expression fragments
29082907 If Len(curExpr) > 0 Then
29092908 parts.Add Array("EXPR" , curExpr)
2910- curExpr = ""
2909+ curExpr = vbNullString
29112910 End If
29122911 ' if depth > 0 we continue collecting outer-level remainder into a new expr (will be added later or at another close)
29132912 GoTo ContinuePlaceholderLoop
@@ -2923,7 +2922,7 @@ ContinuePlaceholderLoop:
29232922 ' If the placeholder wasn't properly closed (unterminated), treat whatever collected as an EXPR
29242923 If Len(curExpr) > 0 Then
29252924 parts.Add Array("EXPR" , curExpr)
2926- curExpr = ""
2925+ curExpr = vbNullString
29272926 End If
29282927
29292928 ' continue scanning main template loop
@@ -2932,7 +2931,7 @@ ContinuePlaceholderLoop:
29322931
29332932 ' closing backtick ends template (outside any placeholder)
29342933 If ch = "`" Then
2935- If Len(curLit) > 0 Then parts.Add Array("LITERAL" , curLit): curLit = ""
2934+ If Len(curLit) > 0 Then parts.Add Array("LITERAL" , curLit): curLit = vbNullString
29362935 i = i + 1 ' consume closing backtick
29372936 Exit Do
29382937 End If
@@ -2974,7 +2973,7 @@ Private Function ParseClassDecl(toks As Collection, ByRef i As Long) As ASF_Map
29742973 Loop
29752974
29762975 ' Check for extends
2977- Dim superClass As String : superClass = ""
2976+ Dim superClass As String : superClass = vbNullString
29782977 If i <= toks.count And LCase$(toks(i)(1 )) = "extends" Then
29792978 i = i + 1
29802979 Do While i <= toks.count And safeTVRetInner(toks, i, 0 ) = "COMMENT"
0 commit comments