Skip to content

Add lexer support for multiline strings (Summer '26) #102

@kjonescertinia

Description

@kjonescertinia

Salesforce Summer '26 introduces multiline string syntax in Apex using triple single-quotes:

String json = '''
{
  "name": "John"
}''';

After the opening ''', the main text starts on a new line. The closing ''' can sit directly after the text or on a new line.

This requires lexer-level support for a new triple-quoted string token, distinct from the existing single-quote string literal.

Tasks

  • Add lexer rule for triple-quoted string literals
  • Verify line/position tracking is correct across multi-line tokens
  • Add parser/lexer tests covering closing quote variants and nested single quotes inside the body

Source: Salesforce Summer '26 Release Notes, Apex section — Write Cleaner Code by Using Multiline Strings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions