public static bool IsDeclarationBoundary(this MetaCompilerAnnotations annots) { if (annots.IsDeclaration()) { return(false); } return(annots.HasAnnotation(MetaCompilerAnnotationInfo.SymbolUse) || annots.HasAnnotation(MetaCompilerAnnotationInfo.Value)); }
public static string GetObjectType(this MetaCompilerAnnotations annots, string name) { foreach (var annot in annots.Annotations) { if (annot.Name == name) { foreach (var prop in annot.Properties) { if (prop.Name == "type") { return("typeof(" + prop.Value + ")"); } } } } return("null"); }
public static bool IsValue(this MetaCompilerAnnotations annots) { return(annots.HasAnnotation(MetaCompilerAnnotationInfo.Value)); }
public static bool IsSymbolUse(this MetaCompilerAnnotations annots) { return(annots.HasAnnotation(MetaCompilerAnnotationInfo.SymbolUse)); }
public static bool IsQualifier(this MetaCompilerAnnotations annots) { return(annots.HasAnnotation(MetaCompilerAnnotationInfo.Qualifier)); }
public static IEnumerable <MetaCompilerAnnotation> GetPropertiesWithValue(this MetaCompilerAnnotations annots) { return(annots.Annotations.Where(a => a.Name == MetaCompilerAnnotationInfo.Property && a.HasProperty("value"))); }
public static MetaCompilerAnnotation GetPropertyWithNoValue(this MetaCompilerAnnotations annots) { return(annots.Annotations.Where(a => a.Name == MetaCompilerAnnotationInfo.Property && !a.HasProperty("value")).FirstOrDefault()); }
public static bool IsPropertyWithNoValue(this MetaCompilerAnnotations annots) { return(GetPropertyWithNoValue(annots) != null); }
public static bool IsProperty(this MetaCompilerAnnotations annots) { return(annots.HasAnnotation(MetaCompilerAnnotationInfo.Property)); }
public static bool IsAnySymbol(this MetaCompilerAnnotations annots) { return(annots.HasAnnotation(MetaCompilerAnnotationInfo.SymbolDef) || annots.HasAnnotation(MetaCompilerAnnotationInfo.SymbolDef)); }