Skip to content

Commit 893709a

Browse files
committed
Corrected many occurrences of "string" to "string literal"
1 parent 621940e commit 893709a

File tree

1 file changed

+23
-20
lines changed

1 file changed

+23
-20
lines changed

specification/dartLangSpec.tex

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9612,7 +9612,8 @@ \subsection{Strings}
96129612
\end{grammar}
96139613

96149614
\LMHash{}%
9615-
A string can be a sequence of single line strings and multiline strings.
9615+
A string literal can be a sequence of single line strings
9616+
and multiline strings.
96169617

96179618
\begin{grammar}
96189619
<singleLineString> ::= <RAW\_SINGLE\_LINE\_STRING>
@@ -9664,24 +9665,25 @@ \subsection{Strings}
96649665
\end{grammar}
96659666

96669667
\LMHash{}%
9667-
A single line string is delimited by
9668+
A single line string literal is delimited by
96689669
either matching single quotes or matching double quotes.
96699670

96709671
\commentary{%
9671-
Hence, \code{'abc'} and \code{"abc"} are both legal strings,
9672+
Hence, \code{'abc'} and \code{"abc"} are both legal string literals,
96729673
as are \code{'He said "To be or not to be" did he not?'} and
96739674
\code{"He said 'To be or not to be' didn't he?"}.
9674-
However, \code{"This'} is not a valid string, nor is \code{'this"}.%
9675+
However, \code{"This'} is not a valid string literal, nor is \code{'this"}.%
96759676
}
96769677

96779678
\commentary{%
9678-
The grammar ensures that a single line string cannot span more than
9679+
The grammar ensures that a single line string literal cannot span more than
96799680
one line of source code,
96809681
unless it includes an interpolated expression that spans multiple lines.%
96819682
}
96829683

96839684
\LMHash{}%
9684-
Adjacent strings are implicitly concatenated to form a single string literal.
9685+
Adjacent string literals are implicitly concatenated
9686+
to form a single string literal.
96859687

96869688
\commentary{%
96879689
Here is an example:%
@@ -9694,7 +9696,7 @@ \subsection{Strings}
96949696
\rationale{%
96959697
Dart also supports the operator + for string concatenation.
96969698

9697-
The + operator on Strings requires a String argument.
9699+
The + operator on \code{String}s requires a \code{String} argument.
96989700
It does not coerce its argument into a string.
96999701
This helps avoid puzzlers such as%
97009702
}
@@ -9719,17 +9721,17 @@ \subsection{Strings}
97199721
String interpolation works well for most cases.
97209722
The main situation where it is not fully satisfactory
97219723
is for string literals that are too large to fit on a line.
9722-
Multiline strings can be useful, but in some cases,
9724+
Multiline string literals can be useful, but in some cases,
97239725
we want to visually align the code.
97249726
This can be expressed by writing
9725-
smaller strings separated by whitespace, as shown here:%
9727+
smaller string literals separated by whitespace, as shown here:%
97269728
}
97279729

97289730
\begin{dartCode}
97299731
'Imagine this is a very long string that does not fit on a line. What shall we do? '
97309732
'Oh what shall we do? '
97319733
'We shall split it into pieces '
9732-
'like so'.
9734+
'like so.'
97339735
\end{dartCode}
97349736

97359737
\LMHash{}%
@@ -9814,22 +9816,23 @@ \subsection{Strings}
98149816
\end{grammar}
98159817

98169818
\LMHash{}%
9817-
Multiline strings are delimited by either
9819+
Multiline string literals are delimited by either
98189820
matching triples of single quotes or
98199821
matching triples of double quotes.
9820-
If the first line of a multiline string consists solely of
9822+
If the first line of a multiline string literal consists solely of
98219823
the whitespace characters defined by the production \synt{WHITESPACE}
98229824
(\ref{lexicalRules}),
98239825
possibly prefixed by \syntax{`\\'},
98249826
then that line is ignored,
98259827
including the line break at its end.
98269828

98279829
\rationale{%
9828-
The idea is to ignore a whitespace-only first line of a multiline string,
9830+
The idea is to ignore a whitespace-only first line of
9831+
a multiline string literal,
98299832
where whitespace is defined as tabs, spaces and the final line break.
98309833
These can be represented directly,
98319834
but since for most characters prefixing by backslash is
9832-
an identity in a non-raw string,
9835+
an identity in a non-raw string literal,
98339836
we allow those forms as well.%
98349837
}
98359838

@@ -9847,7 +9850,7 @@ \subsection{Strings}
98479850
}
98489851

98499852
\LMHash{}%
9850-
Strings support escape sequences for special characters.
9853+
String literals support escape sequences for special characters.
98519854
The escapes are:
98529855

98539856
\begin{itemize}
@@ -9894,12 +9897,12 @@ \subsection{Strings}
98949897
\end{itemize}
98959898

98969899
\LMHash{}%
9897-
Any string may be prefixed with the character \lit{r},
9898-
indicating that it is a \Index{raw string},
9900+
Any string literal may be prefixed with the character \lit{r},
9901+
indicating that it is a \Index{raw string literal},
98999902
in which case no escapes or interpolations are recognized.
99009903

99019904
\LMHash{}%
9902-
Line breaks in a multiline string are represented by
9905+
Line breaks in a multiline string literal are represented by
99039906
the \synt{LINE\_BREAK} production.
99049907
A line break introduces a single newline character (U+000A)
99059908
into the string value.
@@ -9948,12 +9951,12 @@ \subsubsection{String Interpolation}
99489951

99499952
\commentary{%
99509953
The reader will note that the expression inside the interpolation
9951-
could itself include strings,
9954+
could itself include string literals,
99529955
which could again be interpolated recursively.%
99539956
}
99549957

99559958
\LMHash{}%
9956-
An unescaped \lit{\$} character in a string signifies
9959+
An unescaped \lit{\$} character in a string literal signifies
99579960
the beginning of an interpolated expression.
99589961
The \lit{\$} sign may be followed by either:
99599962

0 commit comments

Comments
 (0)