Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1105)

Unified Diff: mojom/generators/go/translator/mojom_file.go

Issue 2233963003: Add support for constants in the new go generator. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Merge branch 'master' of github.com:domokit/mojo into const Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojom/generators/go/templates/templates.go ('k') | mojom/generators/go/translator/names.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojom/generators/go/translator/mojom_file.go
diff --git a/mojom/generators/go/translator/mojom_file.go b/mojom/generators/go/translator/mojom_file.go
index c4ed489b03119ed6723f588c0076ee9779771426..c90455c6d5fba3dc88affd846b2db4536747e07d 100644
--- a/mojom/generators/go/translator/mojom_file.go
+++ b/mojom/generators/go/translator/mojom_file.go
@@ -18,6 +18,7 @@ type TmplFile struct {
Unions []*UnionTemplate
Enums []*EnumTemplate
Interfaces []*InterfaceTemplate
+ Constants []*ConstantTemplate
vardhan 2016/08/15 22:51:59 tabs
azani 2016/08/15 23:49:39 Done.
MojomImports []string
SerializedRuntimeTypeInfo string
}
@@ -222,6 +223,16 @@ type MethodTemplate struct {
////////////////////////////////////////////////////////////////////////////////
+type ConstantTemplate struct {
+ Name string
+
vardhan 2016/08/15 22:51:59 empty spaces not necessary if there are no comment
azani 2016/08/15 23:49:39 Done.
+ Type string
+
+ Value string
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
// EncodingInfo describes the information necessary to encode a field.
type EncodingInfo interface {
// IsSimple returns true if the field is a numeric type, boolean or string.
« no previous file with comments | « mojom/generators/go/templates/templates.go ('k') | mojom/generators/go/translator/names.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698