• Robert Griesemer's avatar
    cmd/compile/internal/syntax: support for alias declarations · 32db3f27
    Robert Griesemer authored
    Permits parsing of alias declarations with -newparser
    
    	const/type/var/func T => p.T
    
    but the compiler will reject it with an error. For now this
    also accepts
    
    	type T = p.T
    
    so we can experiment with a type-alias only scenario.
    
    - renamed _Arrow token to _Larrow (<-)
    - introduced _Rarrow token (=>)
    - introduced AliasDecl node
    - extended scanner to accept _Rarrow
    - extended parser and printer to handle alias declarations
    
    Change-Id: I0170d10a87df8255db9186d466b6fd405228c38e
    Reviewed-on: https://go-review.googlesource.com/29355
    Run-TryBot: Robert Griesemer <gri@golang.org>
    Reviewed-by: 's avatarMatthew Dempsky <mdempsky@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    32db3f27
Name
Last commit
Last update
..
dumper.go Loading commit data...
dumper_test.go Loading commit data...
nodes.go Loading commit data...
parser.go Loading commit data...
parser_test.go Loading commit data...
printer.go Loading commit data...
printer_test.go Loading commit data...
scanner.go Loading commit data...
scanner_test.go Loading commit data...
source.go Loading commit data...
syntax.go Loading commit data...
tokens.go Loading commit data...