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

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

Issue 845053002: Specs and Docs: minor updates to fix mistakes I found when proof-reading (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 11 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/examples/style/toolbar-layout.sky ('k') | sky/specs/runloop.md » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 Parsing 1 Parsing
2 ======= 2 =======
3 3
4 Parsing in Sky is a strict pipeline consisting of five stages: 4 Parsing in Sky is a strict pipeline consisting of five stages:
5 5
6 - decoding, which converts incoming bytes into Unicode characters 6 - decoding, which converts incoming bytes into Unicode characters
7 using UTF-8. 7 using UTF-8.
8 8
9 - normalising, which manipulates the sequence of characters. 9 - normalising, which manipulates the sequence of characters.
10 10
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 If the token is a start tag token, notify the JavaScript token stream 777 If the token is a start tag token, notify the JavaScript token stream
778 callback of the token. 778 callback of the token.
779 779
780 Then, pass the tokens to the tree construction stage. 780 Then, pass the tokens to the tree construction stage.
781 781
782 782
783 Tree construction stage 783 Tree construction stage
784 ----------------------- 784 -----------------------
785 785
786 To construct a node tree from a _sequence of tokens_ and a document 786 To construct a node tree from a _sequence of tokens_ and a document
787 _document_: 787 _document_ (this is implemented in JS):
788 788
789 1. Initialize the _stack of open nodes_ to be _document_. 789 1. Initialize the _stack of open nodes_ to be _document_.
790 2. Initialize _imported modules_ to an empty list. 790 2. Initialize _imported modules_ to an empty list.
791 3. Consider each token _token_ in the _sequence of tokens_ in turn, as 791 3. Consider each token _token_ in the _sequence of tokens_ in turn, as
792 follows. If a token is to be skipped, then jump straight to the 792 follows. If a token is to be skipped, then jump straight to the
793 next token, without doing any more work with the skipped token. 793 next token, without doing any more work with the skipped token.
794 - If _token_ is a string token, 794 - If _token_ is a string token,
795 1. If the value of the token contains only U+0020 and U+000A 795 1. If the value of the token contains only U+0020 and U+000A
796 characters, and there is no ``t`` element on the _stack of 796 characters, and there is no ``t`` element on the _stack of
797 open nodes_, then skip the token. 797 open nodes_, then skip the token.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
836 popped. 836 popped.
837 5. If _node_'s tag name is ``script``, then yield until _imported 837 5. If _node_'s tag name is ``script``, then yield until _imported
838 modules_ contains no entries with unresolved promises, then 838 modules_ contains no entries with unresolved promises, then
839 execute the script given by the element's contents, using the 839 execute the script given by the element's contents, using the
840 associated names as appropriate. 840 associated names as appropriate.
841 - If _token_ is an automatic end tag token: 841 - If _token_ is an automatic end tag token:
842 1. Pop the top node from the _stack of open nodes_, unless it is 842 1. Pop the top node from the _stack of open nodes_, unless it is
843 the document. 843 the document.
844 4. Yield until _imported modules_ has no promises. 844 4. Yield until _imported modules_ has no promises.
845 5. Fire a ``load`` event at the _parsing context_ object. 845 5. Fire a ``load`` event at the _parsing context_ object.
OLDNEW
« no previous file with comments | « sky/examples/style/toolbar-layout.sky ('k') | sky/specs/runloop.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698