You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This specification describes some algorithms used by the static and runtime semantics, they're defined in the form of a function-like syntax along with a
184
-
list of algorithmic steps to take.
185
-
186
-
For example, this describes if a fragment should be spread into place given a
187
-
runtime {objectType} and the fragment's {fragmentType}:
188
-
189
-
doesFragmentTypeApply(objectType, fragmentType):
190
-
* If {fragmentType} is an Object Type:
191
-
* if {objectType} and {fragmentType} are the same type, return {true}, otherwise return {false}.
192
-
* If {fragmentType} is an Interface Type:
193
-
* if {objectType} is an implementation of {fragmentType}, return {true} otherwise return {false}.
194
-
* If {fragmentType} is a Union:
195
-
* if {objectType} is a possible type of {fragmentType}, return {true} otherwise return {false}.
196
-
183
+
This specification describes some algorithms used by the static and runtime
184
+
semantics, they're defined in the form of a function-like syntax with the
185
+
algorithm's name and the arguments it accepts along with a list of algorithmic
186
+
steps to take in the order listed. Each step may establish references to other
187
+
values, check various conditions, call other algorithms, and eventually return
188
+
a value representing the outcome of the algorithm for the provided arguments.
189
+
190
+
For example, the following example describes an algorithm named {Fibonacci} which
191
+
accepts a single argument {number}. The algoritm's steps produce the next number
Copy file name to clipboardExpand all lines: spec/Section 2 -- Language.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,9 @@ tokens (indivisible lexical units). These tokens are defined in a lexical
10
10
grammar which matches patterns of source characters (defined by a
11
11
double-colon `::`).
12
12
13
+
Note: See [Appendix A](#sec-Appendix-Notation-Conventions) for more details about the definition of lexical and syntactic grammar and other notational conventions
0 commit comments