1
1
mirror of https://github.com/github/semantic.git synced 2024-11-23 16:37:50 +03:00

Add edge attributes through the edge.

This commit is contained in:
Rob Rix 2022-03-15 14:30:44 -04:00
parent 8ce450f0d1
commit d5e00dab1c
No known key found for this signature in database
GPG Key ID: 2BE643E01DC032AE

View File

@ -10,6 +10,7 @@
{ {
node @this.node node @this.node
attr (@this.node) type = "identifier" attr (@this.node) type = "identifier"
var @this.text = (source-text @this)
attr (@this.node) text = (source-text @this) attr (@this.node) text = (source-text @this)
} }
@ -24,6 +25,7 @@
edge @this.node -> @id.node edge @this.node -> @id.node
attr (@id.node) role = "module-name-fragment" attr (@id.node) role = "module-name-fragment"
attr (@this.node -> @id.node) index = (named-child-index @id) attr (@this.node -> @id.node) index = (named-child-index @id)
attr (@this.node -> @id.node) text = @id.text
} }
(string) @this (string) @this