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

Side by Side Diff: docs/language/dartLangSpec.tex

Issue 2371743002: Make it a compile-time error if a library has `part "uri";` twice for the same uri. (Closed)
Patch Set: Created 4 years, 2 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 | « no previous file | 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 \documentclass{article} 1 \documentclass{article}
2 \usepackage{epsfig} 2 \usepackage{epsfig}
3 \usepackage{color} 3 \usepackage{color}
4 \usepackage{dart} 4 \usepackage{dart}
5 \usepackage{bnf} 5 \usepackage{bnf}
6 \usepackage{hyperref} 6 \usepackage{hyperref}
7 \usepackage{lmodern} 7 \usepackage{lmodern}
8 \newcommand{\code}[1]{{\sf #1}} 8 \newcommand{\code}[1]{{\sf #1}}
9 \title{Dart Programming Language Specification \\ 9 \title{Dart Programming Language Specification \\
10 {4th edition draft}\\ 10 {4th edition draft}\\
(...skipping 6924 matching lines...) Expand 10 before | Expand all | Expand 10 after
6935 partHeader topLevelDefinition* EOF 6935 partHeader topLevelDefinition* EOF
6936 . 6936 .
6937 \end{grammar} 6937 \end{grammar}
6938 6938
6939 \LMHash{} 6939 \LMHash{}
6940 A {\em part header} begins with \PART{} \OF{} followed by the name of the libr ary the part belongs to. A part declaration consists of a part header followed by a sequence of top-level declarations. 6940 A {\em part header} begins with \PART{} \OF{} followed by the name of the libr ary the part belongs to. A part declaration consists of a part header followed by a sequence of top-level declarations.
6941 6941
6942 \LMHash{} 6942 \LMHash{}
6943 Compiling a part directive of the form \code{\PART{} $s$;} causes the Dart syste m to attempt to compile the contents of the URI that is the value of $s$. The to p-level declarations at that URI are then compiled by the Dart compiler in the s cope of the current library. It is a compile-time error if the contents of the U RI are not a valid part declaration. It is a static warning if the referenced pa rt declaration $p$ names a library other than the current library as the library to which $p$ belongs. 6943 Compiling a part directive of the form \code{\PART{} $s$;} causes the Dart syste m to attempt to compile the contents of the URI that is the value of $s$. The to p-level declarations at that URI are then compiled by the Dart compiler in the s cope of the current library. It is a compile-time error if the contents of the U RI are not a valid part declaration. It is a static warning if the referenced pa rt declaration $p$ names a library other than the current library as the library to which $p$ belongs.
6944 6944
6945 \LMHash{}
6946 It's a compile-time error if the same library contains two part directives with the same URI.
6947
eernst 2016/09/26 14:26:36 At first, it seemed reasonable to put a criterion
Lasse Reichstein Nielsen 2016/09/26 16:40:57 I considered something similar. Since I wrote the
6945 \subsection{Scripts} 6948 \subsection{Scripts}
6946 \LMLabel{scripts} 6949 \LMLabel{scripts}
6947 6950
6948 \LMHash{} 6951 \LMHash{}
6949 A {\em script} is a library whose exported namespace (\ref{exports}) includes a top-level member named \code{main}. It is a static warning if the static type of \code{main} is not assignable to a function type or is a function type with m ore than two required parameters. 6952 A {\em script} is a library whose exported namespace (\ref{exports}) includes a top-level member named \code{main}. It is a static warning if the static type of \code{main} is not assignable to a function type or is a function type with m ore than two required parameters.
6950 6953
6951 A script $S$ may be executed as follows: 6954 A script $S$ may be executed as follows:
6952 6955
6953 \LMHash{} 6956 \LMHash{}
6954 First, $S$ is compiled as a library as specified above. Then, the top-level func tion \code{main} that is in the exported namespace of $S$ is invoked. If \code{m ain} has no positional parameters, it is invoked with no arguments. Otherwise if \code{main} has exactly one positional parameter, it is invoked with a single a ctual argument whose runtime type implements \code{List$<$String$>$}. Otherwise \code{main} is invoked with the following two actual arguments: 6957 First, $S$ is compiled as a library as specified above. Then, the top-level func tion \code{main} that is in the exported namespace of $S$ is invoked. If \code{m ain} has no positional parameters, it is invoked with no arguments. Otherwise if \code{main} has exactly one positional parameter, it is invoked with a single a ctual argument whose runtime type implements \code{List$<$String$>$}. Otherwise \code{main} is invoked with the following two actual arguments:
(...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after
7897 7900
7898 The invariant that each normative paragraph is associated with a line 7901 The invariant that each normative paragraph is associated with a line
7899 containing the text \LMHash{} should be maintained. Extra occurrences 7902 containing the text \LMHash{} should be maintained. Extra occurrences
7900 of \LMHash{} can be added if needed, e.g., in order to make 7903 of \LMHash{} can be added if needed, e.g., in order to make
7901 individual \item{}s in itemized lists addressable. Each \LM.. command 7904 individual \item{}s in itemized lists addressable. Each \LM.. command
7902 must occur on a separate line. \LMHash{} must occur immediately 7905 must occur on a separate line. \LMHash{} must occur immediately
7903 before the associated paragraph, and \LMLabel must occur immediately 7906 before the associated paragraph, and \LMLabel must occur immediately
7904 after the associated \section{}, \subsection{} etc. 7907 after the associated \section{}, \subsection{} etc.
7905 7908
7906 ---------------------------------------------------------------------- 7909 ----------------------------------------------------------------------
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698