Elm Exactly

Restrictioncore-adjacent-items

Stated in Section 2.5 Lexical Analysis.

The following constructs require two items to be adjacent, that is, to have no whitespace or comment between them:

  • the parentheses of the unit (), and the operator and parentheses of an operator value (op\opv);

  • the . of a long identifier and the items on either side of it;

  • the . of a field selection atexp\atexp.lab\lab and the items on either side of it, and the . of a field accessor .lab\lab and the label after it. A . adjacent to a following label is the . of a field selection only if it is adjacent to the item before it and that item ends an atomic expression that may precede a field selection (Section 2.10); otherwise it begins a field accessor (Appendix A). In particular a . directly after a field accessor begins a field accessor;

  • the negation symbol and the atomic expression it negates.

Read it in its chapter·Permanent address: /standard/restrictions/core-adjacent-items

Tests (2)

Discussions

Discuss this restriction·Search the discussions on GitHub

Discussions are on GitHub; one about this restriction has [res:core-adjacent-items] in its title.

A Standard Definition of Elm? (Draft version 0.4) © Rupert Smith. The text is licensed under CC BY 4.0: share and adapt it freely, with credit and a link to the licence.