tools: intrinsic-gen - [[decoration]] -> @attribute

More closely resembles WGSL.

Change-Id: Ia1b93bb443b4e3bf9329f8026d1924f12648cb7b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92245
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
This commit is contained in:
Ben Clayton
2022-06-01 20:44:50 +00:00
committed by Dawn LUCI CQ
parent 0d757d2fad
commit e3e91c0d75
10 changed files with 217 additions and 228 deletions

View File

@@ -52,6 +52,8 @@ func (l *lexer) lex() error {
l.next()
case '\n':
l.next()
case '@':
l.tok(1, tok.Attr)
case '(':
l.tok(1, tok.Lparen)
case ')':
@@ -89,8 +91,6 @@ func (l *lexer) lex() error {
l.skip(l.count(toFirst('\n')))
l.next() // Consume newline
case l.match("/", tok.Divide):
case l.match("[[", tok.Ldeco):
case l.match("]]", tok.Rdeco):
case l.match("->", tok.Arrow):
case l.match("-", tok.Minus):
case l.match("fn", tok.Function):