Skip to content

Commit 7f92578

Browse files
committed
[Bug 15435] Update stdlib with named precedences
1 parent 050f7fc commit 7f92578

17 files changed

Lines changed: 286 additions & 286 deletions

engine/src/canvas.lcb

Lines changed: 112 additions & 112 deletions
Large diffs are not rendered by default.

engine/src/engine.lcb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ Use to test the existence or otherwise of a script object, for example after att
115115
References: ResolveScriptObject(statement)
116116
*/
117117

118-
syntax ScriptObjectExists is postfix operator with precedence 3
118+
syntax ScriptObjectExists is postfix operator with comparison precedence
119119
<Object: Expression> "exists"
120120
begin
121121
MCEngineEvalScriptObjectExists(Object, output)
@@ -141,7 +141,7 @@ Use to test the non-existence or otherwise of a script object, for example after
141141
References: ResolveScriptObject(statement)
142142
*/
143143

144-
syntax ScriptObjectDoesNotExist is postfix operator with precedence 3
144+
syntax ScriptObjectDoesNotExist is postfix operator with comparison precedence
145145
<Object: Expression> "does" "not" "exist"
146146
begin
147147
MCEngineEvalScriptObjectDoesNotExists(Object, output)
@@ -172,7 +172,7 @@ Use to manipulate properties of a script object.
172172
to script objects is not allowed.
173173
*/
174174

175-
syntax PropertyOfScriptObject is prefix operator with precedence 3
175+
syntax PropertyOfScriptObject is prefix operator with property precedence
176176
"property" <Property: Expression> "of" <Object: Expression>
177177
begin
178178
MCEngineExecGetPropertyOfScriptObject(Property, Object, output)
@@ -201,7 +201,7 @@ Description:
201201
>*Note:* An error is thrown if the script object does not exist.
202202
*/
203203

204-
syntax OwnerOfScriptObject is prefix operator with precedence 4
204+
syntax OwnerOfScriptObject is prefix operator with property precedence
205205
"the" "owner" "of" <Object: Expression>
206206
begin
207207
MCEngineEvalOwnerOfScriptObject(Object, output)
@@ -232,7 +232,7 @@ Description:
232232
>*Note:* An error is thrown if the script object does not exist.
233233
*/
234234

235-
syntax ChildrenOfScriptObject is prefix operator with precedence 4
235+
syntax ChildrenOfScriptObject is prefix operator with property precedence
236236
"the" "children" "of" <Object: Expression>
237237
begin
238238
MCEngineEvalChildrenOfScriptObject(Object, output)

engine/src/widget.lcb

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -707,13 +707,13 @@ end syntax
707707
//public foreign handler MCWidgetEvalStateIsPressed(in pState /*as PressedState*/, in pCurrently as CBool, out rPressed as CBool) returns nothing binds to "<builtin>"
708708
//public foreign handler MCWidgetEvalStateIsNotPressed(in pState /*as PressedState*/, in pCurrently as CBool, out rNotPressed as CBool) returns nothing binds to "<builtin>"
709709

710-
/*syntax IsPressed is postfix operator with precedence 5
710+
/*syntax IsPressed is postfix operator with function chunk precedence
711711
<mState: Expression> "is" ( "currently" <Currently=true> | <Currently=false> ) "pressed"
712712
begin
713713
MCWidgetEvalStateIsPressed(mState, Currently, output)
714714
end syntax
715715

716-
syntax IsNotPressed is postfix operator with precedence 5
716+
syntax IsNotPressed is postfix operator with function chunk precedence
717717
<mState: Expression> "is not" ( "currently" <Currently=true> | <Currently=false> ) "pressed"
718718
begin
719719
MCWidgetEvalStateIsNotPressed(mState, Currently, output)
@@ -742,7 +742,7 @@ Example:
742742
end if
743743
*/
744744

745-
syntax IsPointWithinRect is neutral binary operator with precedence 5
745+
syntax IsPointWithinRect is neutral binary operator with comparison precedence
746746
<Point: Expression> "is" "within" <Rect: Expression>
747747
begin
748748
MCWidgetEvalIsPointWithinRect(Point, Rect, output)
@@ -765,7 +765,7 @@ Example:
765765
end if
766766
*/
767767

768-
syntax IsPointNotWithinRect is neutral binary operator with precedence 5
768+
syntax IsPointNotWithinRect is neutral binary operator with comparison precedence
769769
<Point: Expression> "is not" "within" <Rect: Expression>
770770
begin
771771
MCWidgetEvalIsPointNotWithinRect(Point, Rect, output)
@@ -1106,7 +1106,7 @@ Create a new widget object of the specified kind. The widget can then be placed
11061106
References: PlaceWidget (statement)
11071107
*/
11081108

1109-
syntax ANewWidget is prefix operator with precedence 1
1109+
syntax ANewWidget is prefix operator with constructor chunk precedence
11101110
"a" "new" "widget" <mKind: Expression>
11111111
begin
11121112
MCWidgetEvalANewWidget(mKind, output)
@@ -1238,7 +1238,7 @@ widget properties.
12381238

12391239
*/
12401240

1241-
syntax PropertyOfWidget is prefix operator with precedence 3
1241+
syntax PropertyOfWidget is prefix operator with property precedence
12421242
"property" <mName: Expression> "of" <mWidget: Expression>
12431243
begin
12441244
MCWidgetGetPropertyOfWidget(mName, mWidget, output)
@@ -1269,7 +1269,7 @@ Use the rectangle property to set the rectangle of a child widget.
12691269

12701270
*/
12711271

1272-
syntax WidgetRectangleProperty is prefix operator with precedence 2
1272+
syntax WidgetRectangleProperty is prefix operator with property precedence
12731273
"the" "rectangle" "of" <mWidget: Expression>
12741274
begin
12751275
MCWidgetGetRectangleOfWidget(mWidget, output)
@@ -1300,7 +1300,7 @@ Use the width property to set the width of a child widget.
13001300

13011301
*/
13021302

1303-
syntax WidgetWidthProperty is prefix operator with precedence 2
1303+
syntax WidgetWidthProperty is prefix operator with property precedence
13041304
"the" "width" "of" <mWidget: Expression>
13051305
begin
13061306
MCWidgetGetWidthOfWidget(mWidget, output)
@@ -1331,7 +1331,7 @@ Use the height property to set the height of a child widget.
13311331

13321332
*/
13331333

1334-
syntax WidgetHeightProperty is prefix operator with precedence 2
1334+
syntax WidgetHeightProperty is prefix operator with property precedence
13351335
"the" "height" "of" <mWidget: Expression>
13361336
begin
13371337
MCWidgetGetHeightOfWidget(mWidget, output)
@@ -1362,7 +1362,7 @@ The location property is of type com.livecode.canvas.Point.
13621362

13631363
*/
13641364

1365-
syntax WidgetLocationProperty is prefix operator with precedence 2
1365+
syntax WidgetLocationProperty is prefix operator with property precedence
13661366
"the" "location" "of" <mWidget: Expression>
13671367
begin
13681368
MCWidgetGetLocationOfWidget(mWidget, output)
@@ -1393,7 +1393,7 @@ References: MyDisabled (expression)
13931393

13941394
*/
13951395

1396-
syntax WidgetEnabledProperty is prefix operator with precedence 2
1396+
syntax WidgetEnabledProperty is prefix operator with property precedence
13971397
"the" "enabled" "of" <mWidget: Expression>
13981398
begin
13991399
MCWidgetGetEnabledOfWidget(mWidget, output)
@@ -1424,14 +1424,14 @@ References: MyDisabled (expression)
14241424

14251425
*/
14261426

1427-
syntax WidgetDisabledProperty is prefix operator with precedence 2
1427+
syntax WidgetDisabledProperty is prefix operator with property precedence
14281428
"the" "disabled" "of" <mWidget: Expression>
14291429
begin
14301430
MCWidgetGetDisabledOfWidget(mWidget, output)
14311431
MCWidgetSetDisabledOfWidget(input, mWidget)
14321432
end syntax
14331433

1434-
syntax WidgetFontProperty is prefix operator with precedence 4
1434+
syntax WidgetFontProperty is prefix operator with property precedence
14351435
"the" "font" "of" <mWidget: Expression>
14361436
begin
14371437
MCWidgetGetFontOfWidget(mWidget, output)
@@ -1471,7 +1471,7 @@ to be used to disambiguate widget objects returned from operators such as <TheTa
14711471
References: TheTarget (operator), MyChildren (operator)
14721472
*/
14731473

1474-
syntax AnnotationOfWidget is prefix operator with precedence 3
1474+
syntax AnnotationOfWidget is prefix operator with property precedence
14751475
"annotation" <mName: Expression> "of" <mWidget: Expression>
14761476
begin
14771477
MCWidgetGetAnnotationOfWidget(mName, mWidget, output)
@@ -1487,7 +1487,7 @@ public foreign handler MCWidgetGetStackNativeDisplayOfWidget(in pWidget as Widge
14871487
/*
14881488
TODO - docs
14891489
*/
1490-
syntax NativeLayerOfWidget is prefix operator with precedence 3
1490+
syntax NativeLayerOfWidget is prefix operator with property precedence
14911491
"native" "layer" "of" <mWidget: Expression>
14921492
begin
14931493
MCWidgetGetNativeLayerOfWidget(mWidget, output)

libscript/src/arithmetic.lcb

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ The unary plus operator is a no-op on the predefined numeric types.
209209
Tags: Math
210210
*/
211211

212-
syntax PlusUnaryOperator is prefix operator with precedence 0
212+
syntax PlusUnaryOperator is prefix operator with modifier precedence
213213
"+" <Operand: Expression>
214214
begin
215215
MCArithmeticEvalPlusNumber(Operand, output)
@@ -228,7 +228,7 @@ Example:
228228
Tags: Math
229229
*/
230230

231-
syntax MinusUnaryOperator is prefix operator with precedence 0
231+
syntax MinusUnaryOperator is prefix operator with modifier precedence
232232
"-" <Operand: Expression>
233233
begin
234234
MCArithmeticEvalMinusNumber(Operand, output)
@@ -250,7 +250,7 @@ Example:
250250
Tags: Math
251251
*/
252252

253-
syntax PlusOperator is left binary operator with precedence 4
253+
syntax PlusOperator is left binary operator with addition precedence
254254
<Left: Expression> "+" <Right: Expression>
255255
begin
256256
MCArithmeticEvalNumberPlusNumber(Left, Right, output)
@@ -270,7 +270,7 @@ Example:
270270
Tags: Math
271271
*/
272272

273-
syntax MinusOperator is left binary operator with precedence 4
273+
syntax MinusOperator is left binary operator with addition precedence
274274
<Left: Expression> "-" <Right: Expression>
275275
begin
276276
MCArithmeticEvalNumberMinusNumber(Left, Right, output)
@@ -291,7 +291,7 @@ Tags: Math
291291

292292
*/
293293

294-
syntax TimesOperator is left binary operator with precedence 3
294+
syntax TimesOperator is left binary operator with multiplication precedence
295295
<Left: Expression> "*" <Right: Expression>
296296
begin
297297
MCArithmeticEvalNumberTimesNumber(Left, Right, output)
@@ -311,7 +311,7 @@ Example:
311311
Tags: Math
312312
*/
313313

314-
syntax OverOperator is left binary operator with precedence 3
314+
syntax OverOperator is left binary operator with multiplication precedence
315315
<Left: Expression> "/" <Right: Expression>
316316
begin
317317
MCArithmeticEvalNumberOverNumber(Left, Right, output)
@@ -335,7 +335,7 @@ Returns the remainder on dividing <Left> by <Right>
335335

336336
*/
337337

338-
syntax ModOperator is neutral binary operator with precedence 3
338+
syntax ModOperator is neutral binary operator with multiplication precedence
339339
<Left: Expression> "mod" <Right: Expression>
340340
begin
341341
MCArithmeticEvalNumberModNumber(Left, Right, output)
@@ -363,7 +363,7 @@ successive values of x wrap y cycle through the sequence 1, 2, ..., y.
363363

364364
*/
365365

366-
syntax WrapOperator is neutral binary operator with precedence 3
366+
syntax WrapOperator is neutral binary operator with multiplication precedence
367367
<Left: Expression> "wrap" <Right: Expression>
368368
begin
369369
MCArithmeticEvalNumberWrapNumber(Left, Right, output)
@@ -379,7 +379,7 @@ Right: An expression that evaluates to a number.
379379
Returns: True if <Left> is greater than <Right>, and false otherwise.
380380
*/
381381

382-
syntax NumberIsGreaterThanNumber is neutral binary operator with precedence 5
382+
syntax NumberIsGreaterThanNumber is neutral binary operator with comparison precedence
383383
<Left: Expression> ">" <Right: Expression>
384384
begin
385385
MCArithmeticEvalNumberIsGreaterThanNumber(Left, Right, output)
@@ -393,7 +393,7 @@ Right: An expression that evaluates to a number.
393393
Returns: True if <Left> is greater than or equal to <Right>, and false otherwise.
394394
*/
395395

396-
syntax NumberIsGreaterThanOrEqualToNumber is neutral binary operator with precedence 5
396+
syntax NumberIsGreaterThanOrEqualToNumber is neutral binary operator with comparison precedence
397397
<Left: Expression> ">=" <Right: Expression>
398398
begin
399399
MCArithmeticEvalNumberIsGreaterThanOrEqualToNumber(Left, Right, output)
@@ -411,7 +411,7 @@ Description:
411411
Tags: Math
412412
*/
413413

414-
syntax NumberIsLessThanNumber is neutral binary operator with precedence 5
414+
syntax NumberIsLessThanNumber is neutral binary operator with comparison precedence
415415
<Left: Expression> "<" <Right: Expression>
416416
begin
417417
MCArithmeticEvalNumberIsLessThanNumber(Left, Right, output)
@@ -430,7 +430,7 @@ Tags: Math
430430
*/
431431

432432

433-
syntax NumberIsLessThanOrEqualToNumber is neutral binary operator with precedence 5
433+
syntax NumberIsLessThanOrEqualToNumber is neutral binary operator with comparison precedence
434434
<Left: Expression> "<=" <Right: Expression>
435435
begin
436436
MCArithmeticEvalNumberIsLessThanOrEqualToNumber(Left, Right, output)
@@ -450,7 +450,7 @@ Description:
450450
Tags: Math
451451
*/
452452

453-
syntax NumberIsEqualToNumber is neutral binary operator with precedence 6
453+
syntax NumberIsEqualToNumber is neutral binary operator with comparison precedence
454454
<Left: Expression> "=" <Right: Expression>
455455
begin
456456
MCArithmeticEvalEqualToNumber(Left, Right, output)
@@ -471,7 +471,7 @@ References: NumberIsEqualToNumber (operator)
471471
Tags: Math
472472
*/
473473

474-
syntax NumberIsNumber is neutral binary operator with precedence 7
474+
syntax NumberIsNumber is neutral binary operator with comparison precedence
475475
<Left: Expression> "is" <Right: Expression>
476476
begin
477477
MCArithmeticEvalEqualToNumber(Left, Right, output)
@@ -493,7 +493,7 @@ Tags: Math
493493
*/
494494

495495

496-
syntax NumberIsNotNumber is neutral binary operator with precedence 7
496+
syntax NumberIsNotNumber is neutral binary operator with comparison precedence
497497
<Left: Expression> "is not" <Right: Expression>
498498
begin
499499
MCArithmeticEvalNotEqualToNumber(Left, Right, output)
@@ -517,7 +517,7 @@ Description:
517517
Use <NumberFormattedAsString> when you want to manipulate a numeric value as text.
518518
*/
519519

520-
syntax NumberFormattedAsString is postfix operator with precedence 1
520+
syntax NumberFormattedAsString is postfix operator with conversion precedence
521521
<Operand: Expression> "formatted" "as" "string"
522522
begin
523523
MCArithmeticEvalNumberFormattedAsString(Operand, output)
@@ -572,7 +572,7 @@ Description:
572572
Use <StringParsedAsNumber> when you want to interpret text numerically. nothing is returned if parsing was not possible.
573573
*/
574574

575-
syntax StringParsedAsNumber is postfix operator with precedence 1
575+
syntax StringParsedAsNumber is postfix operator with conversion precedence
576576
<Operand: Expression> "parsed" "as" "number"
577577
begin
578578
MCArithmeticEvalStringParsedAsNumber(Operand, output)
@@ -641,7 +641,7 @@ Use <ListOfStringParsedAsListOfNumber> when you want to interpret pieces of text
641641
*Note:* It is an error if any element of <Operand> is not a string.
642642
*/
643643

644-
syntax ListOfStringParsedAsListOfNumber is postfix operator with precedence 1
644+
syntax ListOfStringParsedAsListOfNumber is postfix operator with conversion precedence
645645
<Operand: Expression> "parsed" "as" "list" "of" "number"
646646
begin
647647
MCArithmeticEvalListOfStringParsedAsListOfNumber(Operand, output)

libscript/src/array.lcb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ References: com.livecode.sort(library)
7373
Tags: Arrays
7474
*/
7575

76-
syntax KeysOfArray is prefix operator with precedence 2
76+
syntax KeysOfArray is prefix operator with property precedence
7777
"the" "keys" "of" <Target: Expression>
7878
begin
7979
MCArrayEvalKeysOf(Target, output)
@@ -106,7 +106,7 @@ References: com.livecode.sort(library)
106106
Tags: Arrays
107107
*/
108108

109-
syntax ElementsOfArray is prefix operator with precedence 2
109+
syntax ElementsOfArray is prefix operator with property precedence
110110
"the" "elements" "of" <Target: Expression>
111111
begin
112112
MCArrayEvalElementsOf(Target, output)
@@ -134,7 +134,7 @@ The number of elements in tArray returns the number of key-value pairs stored in
134134
Tags: Arrays
135135
*/
136136

137-
syntax CountElementsOfArray is prefix operator with precedence 1
137+
syntax CountElementsOfArray is prefix operator with property precedence
138138
"the" "number" "of" "elements" "in" <Target: Expression>
139139
begin
140140
MCArrayEvalNumberOfElementsIn(Target, output)
@@ -168,7 +168,7 @@ References: IsInList (operator)
168168
Tags: Arrays
169169
*/
170170

171-
syntax AmongKeysOfArray is neutral binary operator with precedence 1
171+
syntax AmongKeysOfArray is neutral binary operator with comparison precedence
172172
<Needle: Expression> ( "is not" <IsNot=true> | "is" <IsNot=false> | <IsNot=false> ) "among" "the" "keys" "of" <Target: Expression>
173173
begin
174174
// EvalIsAmongTheKeysOfCaseSensitive(Needle, IsNot, Target, output)
@@ -200,7 +200,7 @@ Tags: Arrays
200200

201201
*/
202202

203-
syntax AmongElementsOfArray is neutral binary operator with precedence 1
203+
syntax AmongElementsOfArray is neutral binary operator with comparison precedence
204204
<Needle: Expression> ( "is not" <IsNot=true> | "is" <IsNot=false> | <IsNot=false> ) "among" "the" "elements" "of" <Target: Expression>
205205
begin
206206
MCArrayEvalIsAmongTheElementsOf(Needle, IsNot, Target, output)
@@ -228,7 +228,7 @@ Either locates the element container with the given key for use as the target co
228228
Tags: Arrays
229229
*/
230230

231-
syntax SingletonElementOfArray is postfix operator with precedence 1
231+
syntax SingletonElementOfArray is postfix operator with subscript precedence
232232
<Target: Expression> "[" <Key: Expression> "]"
233233
begin
234234
MCArrayFetchElementOfCaseless(Target, Key, output)

0 commit comments

Comments
 (0)