Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Side by Side Diff: sky/specs/script.md

Issue 884713009: Specs: dartification of dom.md, more work on script.md; this is highly work-in-progress and hasn't … (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sky/specs/pointer.md ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 Sky Script Language 1 Sky Script Language
2 =================== 2 ===================
3 3
4 The Sky script language is based on Dart. 4 The Sky script language is Dart.
5
6 It has the following differences from Dart:
7
8 - the 'library', 'part', 'import', 'export', and 'part of' directives
9 are not supported in sky (sky has its own module system)
10
11 - ``<script>`` elements parse ``topLevelDefinition``s (there is no
12 ``libraryDefinition`` construct in the Sky Script Language).
13 5
14 The way that Sky integrates the module system with its script language 6 The way that Sky integrates the module system with its script language
15 is described in [modules.md](modules.md). 7 is described in [modules.md](modules.md).
8
9 When an method defined as ``external`` receives an argument, it must
10 type-check it, and, if the argument's value is the wrong type, then it
11 must throw an ArgumentError as follows:
12
13 throw new ArgumentError(value, name: name);
14
15 ...where "name" is the name of the argument.
16
17 Further, if the type of the argument is annotated with ``@nonnull``,
18 then the method must additionally throw if the value is of type Null,
19 as follows:
20
21 throw new ArgumentError.notNull(name);
22
23 The ``@nonnull`` annotation is defined as follows:
24
25 ```dart
26 const nonnull = const Object();
27 ```
28
29 The ``@nonnull`` annotation does nothing in code not marked
30 ``external``, but it has been included anyway for documentation
31 purposes. It indicates places where providing a null is a contract
32 violation and that results are therefore likely to be poor.
OLDNEW
« no previous file with comments | « sky/specs/pointer.md ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698