Specify implicit creation

This CL is using an approach that does not rely on program
transformations (based on the idea in CL 50221 from Lasse).

I have taken the approach to make `constant list literal`, `constant
object expression` the higher level concepts, and define the notion of
a `constant context` in terms of the syntax (so it requires an actual
`\CONST{}` or a switch case in the enclosing syntax).

Doing this work, I encountered the section about postfix expressions,
and (like several times before), I noted that there was no
specification of the static analysis at all. So I cleaned up that
section, at the time where I needed to edit it already, because of
the new `constructorInvocation` syntax.

If that is helpful, I could split this CL into a pure "implicit
creation" CL and another "fix up postfix expressions" CL.

Change-Id: I669ce942f698ca2fbb47ea60c58f4f05304ae66d
Reviewed-on: https://dart-review.googlesource.com/c/93432
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
This commit is contained in:
Erik Ernst 2019-02-26 12:22:56 +00:00
parent b446d0a226
commit 2eb3ac7c02
2 changed files with 785 additions and 360 deletions

View file

@ -107,27 +107,28 @@
\newcommand{\Case}[1]{\textbf{Case }$\langle\hspace{0.1em}${#1}$\hspace{0.1em}\rangle$\textbf{.}}
\newcommand{\EndCase}{\mbox{}\hfill$\scriptscriptstyle\Box$\xspace}
\newenvironment{dartCode}[1][!ht] {
\newenvironment{dartCode}[1][!ht] {%
\def\@programcr{\@addfield\strut}%
\let\\=\@programcr%
\relax\@vobeyspaces\obeylines%
\ttfamily\color{commentaryColor}%
\vspace{1em}
\vspace{1em}%
}{\normalcolor\vspace{1em}}
\newenvironment{normativeDartCode}[1][!ht] {
\newenvironment{normativeDartCode}[1][!ht] {%
\def\@programcr{\@addfield\strut}%
\let\\=\@programcr%
\relax\@vobeyspaces\obeylines%
\ttfamily\color{normativeColor}%
\vspace{1em}
\vspace{1em}%
}{\normalcolor\vspace{1em}}
% Used for comments in a code context.
\def\comment#1{\textsf{#1}}
% A commonly used name for an identifier
% A commonly used metavariable for an identifier, operator.
\newcommand{\id}{\metavar{id}}
\newcommand{\op}{\metavar{op}}
% Used for defining occurrence of phrase, with customized index entry.
\newcommand{\IndexCustom}[2]{%
@ -142,7 +143,7 @@
\newcommand{\Index}[1]{\IndexCustom{#1}{#1}}
% Same appearance, but not adding an entry to the index.
\newcommand{\NoIndex}[1]{
\newcommand{\NoIndex}[1]{%
\leavevmode\marginpar{\ensuremath{\diamond}}\emph{#1}}
% Used to specify comma separated lists of similar symbols.

File diff suppressed because it is too large Load diff