protected override IEnumerable <string> PreGenerate(uint modelId, string source) { var split = source.Split(' '); if (!Keyword.Equals(split[0])) { return(null); } var model = split[1]; if (model.StartsWith("M")) { if (PsEosModels.Contains(model) && split.Length == 2) { return(null); } split[1] = $"EOS{model}"; } split = AdaptMark(split); if (split[split.Length - 1].Equals("5D")) { return new[] { "5DC" } } ; return(split.Skip(1)); }
public void EqualOnIdentityIsTrue() { Symbol sym1 = Symbol.intern("abc"); Keyword k1 = Keyword.intern(sym1); Expect(k1.Equals(k1)); }
public void EqualsOnNonKeywordIsFalse() { Symbol sym1 = Symbol.intern("abc"); Keyword k1 = Keyword.intern(sym1); Expect(k1.Equals(sym1), False); }
protected override IEnumerable <string> PreGenerate(string source) { var split = source.Split(' '); if (!Keyword.Equals(split[0])) { return(null); } if (split[1].Equals("M")) { return new[] { "EOSM" } } ; if (split[1].StartsWith("M")) { return(null); } split = AdaptMark(split); if (split[split.Length - 1].Equals("5D")) { return new[] { "5DC" } } ; return(split.Skip(1)); }
public override bool Equals(object obj) { if (obj is Language == false) { return(false); } return(Keyword.Equals(((Language)obj).Keyword, StringComparison.CurrentCultureIgnoreCase)); }
protected virtual IEnumerable <string> PreGenerate(string source) { var split = source.Split(' '); if (!Keyword.Equals(split[0])) { return(null); } return(split.Skip(1)); }
public StaticMethodExpr(string source, IPersistentMap spanMap, Symbol tag, Type type, string methodName, IList <Type> typeArgs, IList <HostArg> args, bool tailPosition) : base(source, spanMap, tag, methodName, typeArgs, args, tailPosition) { _type = type; _method = Reflector.GetMatchingMethod(spanMap, _type, _args, _methodName, typeArgs); if (_method != null && warnOnBoxedKeyword.Equals(RT.UncheckedMathVar.deref()) && IsBoxedMath(_method)) { RT.errPrintWriter().WriteLine("Boxed math warning, {0}:{1}:{2} - call {3}.", Compiler.SourcePathVar.deref(), Compiler.GetLineFromSpanMap(spanMap), Compiler.GetColumnFromSpanMap(spanMap), _method.ToString()); } }
protected override IEnumerable <string> PreGenerate(uint modelId, string source) { var split = base.PreGenerate(modelId, source); if (split == null) { return(null); } if (!Keyword.Equals(split.First())) // No "Digital" prefix { split = new[] { Keyword } }
public object valAt(object key, object notFound) { if (FORM_KW.Equals(key)) { return(_form); } else if (SPLICING_KW.Equals(key)) { return(_splicing); } else { return(notFound); } }
public void TestMethod1() { //Create Keyword and Paper Keyword expectedKeyword = new Keyword("Testing"); Paper expectedPaper = new Paper("Some Paper About Testing"); //Add keyword to paper expectedPaper.AddKeyword(expectedKeyword); //A mapping system to store the papers in SystematicMappingSystem sms = new SystematicMappingSystem(); //Add paper to the system sms.AddPaper(expectedPaper); List<Keyword> keyWordsList = sms.GetKeywordsFromPaper("Some Paper About Testing"); Assert.IsTrue(expectedKeyword.Equals(keyWordsList.First()) && keyWordsList.Count() == 1); }
protected override IEnumerable <string> PreGenerate(string source) { var split = source.Split(' '); if (!Keyword.Equals(split[0])) { return(null); } split = AdaptMark(split); if (split[split.Length - 1].Equals("ELPH")) // Trim Digital ELPH { return(split.Take(split.Length - 2).Skip(1)); } return(split.Skip(1)); }
protected override IEnumerable <string> PreGenerate(uint modelId, string source) { if (modelId > MaxModelId) { return(null); } var split = source.Split(' '); if (!Keyword.Equals(split[0])) { return(null); } split = AdaptMark(split); return(split.Skip(1)); }
public bool MatchesStep(string keyword, string text) { return(Keyword.Equals(keyword.Trim(), StringComparison.OrdinalIgnoreCase) && Regex.IsMatch(text.Trim(), Pattern, RegexOptions.IgnoreCase)); }