Commit 5cf0d974 authored by Robert Wilhelm's avatar Robert Wilhelm Committed by Alexandre Julliard

vbscript: Accept private and public const global declarations.

parent ac5e7fab
......@@ -175,7 +175,9 @@ SourceElements
| SourceElements ClassDeclaration { source_add_class(ctx, $2); }
GlobalDimDeclaration
: tPRIVATE DimDeclList { $$ = new_dim_statement(ctx, @$, $2); CHECK_ERROR; }
: tPRIVATE tCONST ConstDeclList { $$ = new_const_statement(ctx, @$, $3); CHECK_ERROR; }
| tPUBLIC tCONST ConstDeclList { $$ = new_const_statement(ctx, @$, $3); CHECK_ERROR; }
| tPRIVATE DimDeclList { $$ = new_dim_statement(ctx, @$, $2); CHECK_ERROR; }
| tPUBLIC DimDeclList { $$ = new_dim_statement(ctx, @$, $2); CHECK_ERROR; }
ExpressionNl_opt
......
......@@ -1210,10 +1210,16 @@ Call ok(getVT(test) = "VT_DISPATCH", "getVT(test) = " & getVT(test))
Call ok(Me is Test, "Me is not Test")
Const c1 = 1, c2 = 2, c3 = -3
Private Const c4 = 4
Public Const c5 = 5
Call ok(c1 = 1, "c1 = " & c1)
Call ok(getVT(c1) = "VT_I2", "getVT(c1) = " & getVT(c1))
Call ok(c3 = -3, "c3 = " & c3)
Call ok(getVT(c3) = "VT_I2", "getVT(c3) = " & getVT(c3))
Call ok(c4 = 4, "c4 = " & c4)
Call ok(getVT(c4) = "VT_I2", "getVT(c4) = " & getVT(c4))
Call ok(c5 = 5, "c5 = " & c5)
Call ok(getVT(c5) = "VT_I2", "getVT(c5) = " & getVT(c5))
Const cb = True, cs = "test", cnull = null
Call ok(cb, "cb = " & cb)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment