public override Dictionary <string, string?> VisitCommasep_ident_with_opt_single_value([NotNull] FlatBuffersParser.Commasep_ident_with_opt_single_valueContext context) { var pairs = new Dictionary <string, string?>(StringComparer.OrdinalIgnoreCase); if (context?.ident_with_opt_single_value() != null) { foreach (var item in context.ident_with_opt_single_value()) { string identifier = item.IDENT().GetText(); string?value = item.single_value()?.GetText()?.Trim('"'); pairs[identifier] = value; } } foreach (var unsupportedAttribute in MetadataKeys.UnsupportedStandardAttributes) { if (pairs.ContainsKey(unsupportedAttribute)) { ErrorContext.Current?.RegisterError($"FlatSharpCompiler does not support the '{unsupportedAttribute}' attribute in FBS files."); } } return(pairs); }
public override Dictionary <string, string> VisitCommasep_ident_with_opt_single_value([NotNull] FlatBuffersParser.Commasep_ident_with_opt_single_valueContext context) { var pairs = new Dictionary <string, string>(StringComparer.OrdinalIgnoreCase); if (context?.ident_with_opt_single_value() != null) { foreach (var item in context.ident_with_opt_single_value()) { string identifier = item.IDENT().GetText(); string value = item.single_value()?.GetText()?.Trim('"'); pairs[identifier] = value; } } return(pairs); }