File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed
Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ vsspell_section_id = 1566b770c5af48b08aa5b43b10ffef28
44vsspell_ignored_words_1566b770c5af48b08aa5b43b10ffef28 = File:IgnoredWords.dic|def
55
66[* .kls ]
7- # VSSPELL: DIsable everything for the sample languages
7+ # VSSPELL: Disable everything for the sample languages
88vsspell_section_id = 257 c51e4a39d462090397bebd5922176
99vsspell_spell_check_as_you_type = false
1010vsspell_include_in_project_spell_check = false
Original file line number Diff line number Diff line change @@ -19,8 +19,9 @@ public KaleidoscopeUserOperatorListener( DynamicRuntimeState state )
1919 /// <summary>Handles successfully parsed function definitions</summary>
2020 /// <param name="context">Context parse node for the parsed function</param>
2121 /// <remarks>
22- /// Upon successful parse of a function definition this check if it is a user defined operator
23- /// and updates the RuntimeState accordingly, if it is.
22+ /// Upon successful parse of a function definition this checks if it is a user defined operator
23+ /// and updates the RuntimeState accordingly, if it is. This is used for support of user defined
24+ /// operators providing user defined precedence.
2425 /// </remarks>
2526 public override void ExitFunctionDefinition ( KaleidoscopeParser . FunctionDefinitionContext context )
2627 {
Original file line number Diff line number Diff line change 1+ # unary operator to perform a logical NOT
12def unary!(v)
23 if v then
34 0
45 else
56 1;
67
8+ # unary operator to perform a mathematical negation
79def unary-(v)
810 0-v;
911
12+ # Comparison operator
1013def binary> 10 (LHS RHS)
1114 RHS < LHS;
1215
16+ # Logical OR operator
1317def binary| 5 (LHS RHS)
1418 if LHS then
1519 1
@@ -18,17 +22,21 @@ def binary| 5 (LHS RHS)
1822 else
1923 0;
2024
25+ # Logical AND operator
2126def binary& 6 (LHS RHS)
2227 if !LHS then
2328 0
2429 else
2530 !!RHS;
2631
32+ # arithmatic equality test
2733def binary== 9 (LHS RHS)
2834 !(LHS < RHS | LHS > RHS);
2935
36+ # selector operator
3037def binary : 1 (x y) y;
3138
39+ # declare access to built-in function
3240extern putchard(char);
3341
3442def printdensity(d)
You can’t perform that action at this time.
0 commit comments