public static P5Scalar SymbolicReferenceScalar(Runtime runtime, IP5ScalarBody any, bool create) { string name = any.AsString(runtime); var glob = SymbolicReference(runtime, name, create); if (glob == null) return null; if (glob.Scalar != null || !create) return glob.Scalar; return glob.Scalar = new P5Scalar(runtime); }
public static P5Hash SymbolicReferenceHash(Runtime runtime, IP5ScalarBody any, bool create) { string name = any.AsString(runtime); if (name.EndsWith("::")) { var pack = runtime.SymbolTable.GetPackage(runtime, name.Substring(0, name.Length - 2), create); return pack; } var glob = SymbolicReference(runtime, name, create); if (glob == null) return null; if (glob.Hash != null || !create) return glob.Hash; return glob.Hash = new P5Hash(runtime); }
public static P5Typeglob SymbolicReferenceGlob(Runtime runtime, IP5ScalarBody any, bool create) { string name = any.AsString(runtime); return SymbolicReference(runtime, name, create); }
public static P5Handle SymbolicReferenceHandle(Runtime runtime, IP5ScalarBody any, bool create) { string name = any.AsString(runtime); var glob = SymbolicReference(runtime, name, create); if (glob == null) return null; return glob.Handle; }
public static P5Code SymbolicReferenceCode(Runtime runtime, IP5ScalarBody any, bool create) { string name = any.AsString(runtime); var glob = SymbolicReference(runtime, name, create); if (glob == null) return null; if (glob.Code != null || !create) return glob.Code; return glob.Code = new P5Code(name, null); }