Lines Matching refs:parser

43 	res, err := parser.Print(tree)
209 tree *parser.File
212 func (f Fixer) Tree() *parser.File {
216 func NewFixer(tree *parser.File) *Fixer {
227 func (f *Fixer) Fix(config FixRequest) (*parser.File, error) {
268 bytes, err := parser.Print(f.tree)
276 buf, err := parser.Print(f.tree)
288 func parse(name string, r io.Reader) (*parser.File, error) {
289 tree, errs := parser.Parse(name, r, parser.NewScope(nil))
310 func simplifyKnownPropertiesDuplicatingEachOther(mod *parser.Module, buf []byte, patchList *parser.…
318 mod, ok := def.(*parser.Module)
337 src, ok := srcs.Values[0].(*parser.String)
359 mod, ok := def.(*parser.Module)
387 defaults := &parser.Property{
389 Value: &parser.List{
390 Values: []parser.Expression{
391 &parser.String{
405 mod, ok := def.(*parser.Module)
442 mod, ok := def.(*parser.Module)
486 mod, ok := def.(*parser.Module)
502 mod, ok := def.(*parser.Module)
515 prop := &parser.Property{
517 Value: &parser.Bool{
529 func getStringProperty(prop *parser.Property, fieldName string) string {
530 if propsAsMap, ok := prop.Value.(*parser.Map); ok {
533 if propFieldAsString, ok := propField.Value.(*parser.String); ok {
545 func indicateAttributeError(mod *parser.Module, attributeName string, format string, a ...interface…
547 mod.Properties = append(mod.Properties, &parser.Property{
549 Value: &parser.String{Value: "ERROR: " + msg},
560 func resolveLocalModule(mod *parser.Module, val parser.Expression) parser.Expression {
561 if varLocalName, ok := val.(*parser.Variable); ok {
591 func (f etcPrebuiltModuleUpdate) update(m *parser.Module, path string) bool {
596 m.Properties = append(m.Properties, &parser.Property{
598 Value: &parser.String{Value: trimmedPath},
604 …m.Properties = append(m.Properties, &parser.Property{Name: flag, Value: &parser.Bool{Value: true, …
637 mod, ok := def.(*parser.Module)
685 mod, ok := def.(*parser.Module)
717 mod, ok := def.(*parser.Module)
725 if certStr, ok := cert.Value.(*parser.String); ok {
728 prop := &parser.Property{
730 Value: &parser.Bool{
744 mod, ok := def.(*parser.Module)
750 prop := &parser.Property{
752 Value: &parser.Bool{
776 mod, ok := def.(*parser.Module)
785 newValues := []parser.Expression{}
787 stringValue, ok := v.(*parser.String)
809 mod, ok := def.(*parser.Module)
820 newDefs := make([]parser.Definition, 0, len(f.tree.Defs))
822 if mod, ok := def.(*parser.Module); ok && mod.Type == "soong_config_bool_variable" {
838 return runPatchListMod(func(mod *parser.Module, buf []byte, patchList *parser.PatchList) error {
851 nameValue, ok := item.(*parser.String)
867 *patchList = parser.PatchList{}
892 mod, ok := def.(*parser.Module)
910 func convertToSingleSource(mod *parser.Module, srcPropertyName string) {
912 if srcList, ok := srcs.Value.(*parser.List); ok {
916 &parser.Property{
924 } else if _, ok = srcs.Value.(*parser.Variable); ok {
927 &parser.Property{Name: srcPropertyName,
937 type patchListModFunction func(*parser.Module, []byte, *parser.PatchList) error
947 var patchlist parser.PatchList
949 mod, ok := def.(*parser.Module)
988 func reorderCommonProperties(mod *parser.Module, buf []byte, patchlist *parser.PatchList) error {
1034 func removeTags(mod *parser.Module, buf []byte, patchlist *parser.PatchList) error {
1039 list, ok := prop.Value.(*parser.List)
1047 str, ok := item.(*parser.String)
1110 GetProperty(string) (*parser.Property, bool)
1114 func removeNestedProperty(mod *parser.Module, patchList *parser.PatchList, propName string) error {
1120 var propToRemove *parser.Property
1142 propMap, ok := p.Value.(*parser.Map)
1163 return func(mod *parser.Module, buf []byte, patchList *parser.PatchList) error {
1168 func mergeMatchingModuleProperties(mod *parser.Module, buf []byte, patchlist *parser.PatchList) err…
1172 func mergeMatchingProperties(properties *[]*parser.Property, buf []byte, patchlist *parser.PatchLis…
1173 seen := make(map[string]*parser.Property)
1184 if mapProperty, ok := property.Value.(*parser.Map); ok {
1195 func mergeProperties(a, b *parser.Property, buf []byte, patchlist *parser.PatchList) error {
1198 if _, isVar := a.Value.(*parser.Variable); isVar {
1201 if _, isVar := b.Value.(*parser.Variable); isVar {
1209 case parser.StringType:
1211 case parser.ListType:
1218 func mergeListProperties(a, b *parser.Property, buf []byte, patchlist *parser.PatchList) error {
1219 aval, oka := a.Value.(*parser.List)
1220 bval, okb := b.Value.(*parser.List)
1254 func filterExpressionList(patchList *parser.PatchList, items *parser.List, removals *parser.List) {
1259 equal, err := parser.ExpressionsAreSame(item, removal)
1279 func removeMatchingModuleListProperties(mod *parser.Module, patchList *parser.PatchList, canonicalN…
1284 legacyList, ok := legacyProp.Value.(*parser.List)
1293 localPatches := parser.PatchList{}
1307 func hasNonEmptyLiteralListProperty(mod *parser.Module, name string) bool {
1312 func hasNonEmptyLiteralStringProperty(mod *parser.Module, name string) bool {
1317 func getLiteralListProperty(mod *parser.Module, name string) (list *parser.List, found bool) {
1322 list, ok = prop.Value.(*parser.List)
1326 func getLiteralListPropertyValue(mod *parser.Module, name string) (list []string, found bool) {
1332 stringValue, ok := v.(*parser.String)
1342 func getLiteralStringProperty(mod *parser.Module, name string) (s *parser.String, found bool) {
1347 s, ok = prop.Value.(*parser.String)
1351 func getLiteralStringPropertyValue(mod *parser.Module, name string) (s string, found bool) {
1360 func getLiteralBoolProperty(mod *parser.Module, name string) (b *parser.Bool, found bool) {
1365 b, ok = prop.Value.(*parser.Bool)
1369 func getLiteralBoolPropertyValue(mod *parser.Module, name string) (s bool, found bool) {
1378 func propertyIndex(props []*parser.Property, propertyName string) int {
1387 func renameProperty(mod *parser.Module, from, to string) {
1395 func removeProperty(mod *parser.Module, propertyName string) {
1396 newList := make([]*parser.Property, 0, len(mod.Properties))
1414 func formatFlagProperty(mod *parser.Module, field string, buf []byte, patchlist *parser.PatchList) …
1422 curValue, ok := listValue.Values[i].(*parser.String)
1430 nextValue, ok := listValue.Values[i+1].(*parser.String)
1454 func formatFlagProperties(mod *parser.Module, buf []byte, patchlist *parser.PatchList) error {
1481 return func(mod *parser.Module, buf []byte, patchList *parser.PatchList) error {
1488 func rewriteLicenseProperties(mod *parser.Module, patchList *parser.PatchList, fs pathtools.FileSys…
1606 func mergeLiteralListPropertyValue(mod *parser.Module, property string) (s string, err error) {
1619 func hasValueStartWithTwoDotsLiteralList(mod *parser.Module, property string) bool {
1677 func getDirFromProperty(mod *parser.Module, property string, fs pathtools.FileSystem, relativePath …
1710 func getPathFromProperty(mod *parser.Module, property string, fs pathtools.FileSystem, relativePath…
1729 mod, ok := def.(*parser.Module)
1737 propVal, ok := prop.Value.(*parser.String)
1746 func parserPath(path string, fs pathtools.FileSystem) (tree *parser.File, err error) {
1782 mod, ok := def.(*parser.Module)
1814 func hasProperty(mod *parser.Module, propName string) bool {