Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
0f50cb32
Commit
0f50cb32
authored
Apr 30, 2014
by
Jacek Caban
Committed by
Alexandre Julliard
Apr 30, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Allow property getters to take arguments.
parent
4c8edb1b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
2 deletions
+29
-2
parser.y
dlls/vbscript/parser.y
+2
-2
lang.vbs
dlls/vbscript/tests/lang.vbs
+27
-0
No files found.
dlls/vbscript/parser.y
View file @
0f50cb32
...
...
@@ -403,8 +403,8 @@ ClassBody
| PropertyDecl tNL ClassBody { $$ = add_class_function(ctx, $3, $1); CHECK_ERROR; }
PropertyDecl
: Storage_opt tPROPERTY tGET tIdentifier
EmptyBrackets
_opt tNL StatementsNl_opt tEND tPROPERTY
{ $$ = new_function_decl(ctx, $4, FUNC_PROPGET, $1,
NULL
, $7); CHECK_ERROR; }
: Storage_opt tPROPERTY tGET tIdentifier
ArgumentsDecl
_opt tNL StatementsNl_opt tEND tPROPERTY
{ $$ = new_function_decl(ctx, $4, FUNC_PROPGET, $1,
$5
, $7); CHECK_ERROR; }
| Storage_opt tPROPERTY tLET tIdentifier '(' ArgumentDecl ')' tNL StatementsNl_opt tEND tPROPERTY
{ $$ = new_function_decl(ctx, $4, FUNC_PROPLET, $1, $6, $9); CHECK_ERROR; }
| Storage_opt tPROPERTY tSET tIdentifier '(' ArgumentDecl ')' tNL StatementsNl_opt tEND tPROPERTY
...
...
dlls/vbscript/tests/lang.vbs
View file @
0f50cb32
...
...
@@ -849,6 +849,10 @@ Class TestClass
Call
ok
(
getVT
(
publicProp2
)
=
"VT_I2*"
,
"getVT(publicProp2) = "
&
getVT
(
publicProp2
))
Call
ok
(
getVT
(
Me
.
publicProp2
)
=
"VT_I2"
,
"getVT(Me.publicProp2) = "
&
getVT
(
Me
.
publicProp2
))
End
Sub
Property
Get
gsGetProp
(
x
)
gsGetProp
=
x
End
Property
End
Class
Call
testDisp
(
new
testClass
)
...
...
@@ -916,6 +920,29 @@ Call ok(funcCalled = "terminate", "funcCalled = " & funcCalled)
Call
(
New
testclass
).
publicSub
()
Call
(
New
testclass
).
publicSub
class
PropTest
property
get
prop0
()
prop0
=
1
end
property
property
get
prop1
(
x
)
prop1
=
x
+
1
end
property
property
get
prop2
(
x
,
y
)
prop2
=
x
+
y
end
property
end
class
set
obj
=
new
PropTest
call
ok
(
obj
.
prop0
=
1
,
"obj.prop0 = "
&
obj
.
prop0
)
call
ok
(
obj
.
prop1
(
3
)
=
4
,
"obj.prop1(3) = "
&
obj
.
prop1
(
3
))
call
ok
(
obj
.
prop2
(
3
,
4
)
=
7
,
"obj.prop2(3,4) = "
&
obj
.
prop2
(
3
,
4
))
call
obj
.
prop0
()
call
obj
.
prop1
(
2
)
call
obj
.
prop2
(
3
,
4
)
x
=
"following ':' is correct syntax"
:
x
=
"following ':' is correct syntax"
::
:
::
x
=
"also correct syntax"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment