Skip to content

Word converter: line comments in ANTLR are handled badly #394

Closed
@jskeet

Description

@jskeet

Sample input:

reference_type
    : class_type
    | interface_type
    | array_type
    // This is a line comment
    | delegate_type
    | 'dynamic'
    ;

Output in Word:

reference_type
	: class_type
	| interface_type
	| array_type         // This is a line comment
	| delegate_type
	| 'dynamic'
	;

The comment that was intended to be about delegate_type is instead associated with array_type.

Additionally, we can't handle comments before the first colon (as Nigel has discovered with his string interpolation PR).

We should probably check that we don't actually use line comments in any ANTLR bits, as otherwise we're already broken (rather than just "not supporting something that would be nice").

Metadata

Metadata

Assignees

Labels

type: toolsThis issue (or PR) relates to a tool, not the Standard

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions