Skip to content

Generated code of SCSS grammer does not compile #280

@n9

Description

@n9

I have downloaded SCSS grammar from https://github.com/antlr/grammars-v4/tree/master/scss.
I have installed the antlr nuget.
I was unable to install the VS extension (it was not in the list, I have VS 15.6.6). So I have modified the csproj manually:

    <Antlr4 Include="Grammars\ScssLexer.g4">
      <Generator>MSBuild:Compile</Generator>
    </Antlr4>
    <Antlr4 Include="Grammars\ScssParser.g4">
      <Generator>MSBuild:Compile</Generator>
    </Antlr4>

Then I build the project. The build failed.

The generated file looks broken. Excerpt:

public ValuesContext @struct@extern@do@ushort@float@while@operator@ref@protected@readonly@continue@else@checked@lock@catch@if@case@new@using@static@void@in@sizeof@byte@double@sealed@finally@this@unchecked@is@params@enum@explicit@as@null@true@fixed@try@decimal@object@implicit@internal@private@virtual@bool@const@string@for@interface@unsafe@long@out@switch@delegate@foreachkey@ulong@goto@public@stackalloc@override@event@class@typeof@break@false@volatile@abstract@uint@int@throw@char@namespace@sbyte@short@return@base() {
	return GetRuleContext<ValuesContext>(0);
}

What I am doing wrong? Or it is a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions