Chromium Code Reviews

Side by Side Diff: mojom/mojom_parser/parser/parse_driver.go

Issue 1805743003: Mojom frontend: Compute, validate and populate struct field version info (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rename ComputeDataForGenerators to ComputeFinalData Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package parser 5 package parser
6 6
7 import ( 7 import (
8 "fmt" 8 "fmt"
9 "io/ioutil" 9 "io/ioutil"
10 "mojom/mojom_parser/mojom" 10 "mojom/mojom_parser/mojom"
(...skipping 151 matching lines...)
162 } 162 }
163 } 163 }
164 } 164 }
165 } 165 }
166 166
167 // Perform type and value resolution 167 // Perform type and value resolution
168 if err = descriptor.Resolve(); err != nil { 168 if err = descriptor.Resolve(); err != nil {
169 return 169 return
170 } 170 }
171 171
172 // Compute enum value integers.
173 if err = descriptor.ComputeEnumValueIntegers(); err != nil {
174 return
175 }
176
177 // Compute data for generators. 172 // Compute data for generators.
178 » err = descriptor.ComputeDataForGenerators() 173 » err = descriptor.ComputeFinalData()
179 return 174 return
180 } 175 }
181 176
182 type FileReference struct { 177 type FileReference struct {
183 mojomFile *mojom.MojomFile 178 mojomFile *mojom.MojomFile
184 importedFrom *FileReference 179 importedFrom *FileReference
185 specifiedPath string 180 specifiedPath string
186 absolutePath string 181 absolutePath string
187 directoryPath string 182 directoryPath string
188 } 183 }
(...skipping 111 matching lines...)
300 return fmt.Errorf("File not found: %s", fileRef) 295 return fmt.Errorf("File not found: %s", fileRef)
301 } 296 }
302 297
303 func isFile(path string) bool { 298 func isFile(path string) bool {
304 info, err := os.Stat(path) 299 info, err := os.Stat(path)
305 if err != nil { 300 if err != nil {
306 return false 301 return false
307 } 302 }
308 return !info.IsDir() 303 return !info.IsDir()
309 } 304 }
OLDNEW
« no previous file with comments | « mojom/mojom_parser/parser/computed_data_test.go ('k') | mojom/mojom_parser/serialization/serialization.go » ('j') | no next file with comments »

Powered by Google App Engine