-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathidea.gdsl
More file actions
25 lines (20 loc) · 1001 Bytes
/
idea.gdsl
File metadata and controls
25 lines (20 loc) · 1001 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
def dslContext = context(
filetypes: ['mydsl'],
scope: scriptScope())
contributor(dslContext) {
method name: 'rating', type: 'java.lang.Double', params: [location: 'java.lang.String', price: 'java.lang.Double', sqft: 'java.lang.Double']
method name: 'apartment', type: 'void', params: [body: 'groovy.lang.Closure']
method name: 'apartment', type: 'void', params: [location: 'java.lang.String', body: 'groovy.lang.Closure']
}
def contributorBody = context(
filetypes: ['mydsl'],
scope: closureScope(isArg: true))
contributor([contributorBody]) {
if (enclosingCall("apartment")) {
method name: 'location', type: 'void', params: [value: 'java.lang.String']
method name: 'price', type: 'void', params: [value: 'java.lang.Double']
method name: 'sqft', type: 'void', params: [value: 'java.lang.Double']
method name: 'realtorName', type: 'void', params: [value: 'java.lang.String']
method name: 'mail', type: 'void', params: [value: 'java.lang.String']
}
}