Exemple #1
0
        public ISyntaxRegion GetNextMetaBlockOrStatStmt(CodeLocation until)
        {
            if (nextStatStmt == null && StaticStatementEnum != null) {
                if (StaticStatementEnum.MoveNext ())
                    nextStatStmt = StaticStatementEnum.Current;
                else
                    StaticStatementEnum = null;
            }
            if (nextMetaDecl == null && MetaBlockEnum != null) {
                if (MetaBlockEnum.MoveNext ())
                    nextMetaDecl = MetaBlockEnum.Current;
                else
                    MetaBlockEnum = null;
            }

            ISyntaxRegion sr;

            if (nextStatStmt != null) {
                if (nextMetaDecl == null)
                    sr = nextStatStmt;
                else
                    sr = nextStatStmt.First (nextMetaDecl);
            } else if (nextMetaDecl != null)
                sr = nextMetaDecl;
            else
                return null;

            return sr.Location < until ? sr : null;
        }
Exemple #2
0
        public ISyntaxRegion GetNextMetaBlockOrStatStmt(CodeLocation until)
        {
            if (nextStatStmt == null && StaticStatementEnum != null)
            {
                if (StaticStatementEnum.MoveNext())
                {
                    nextStatStmt = StaticStatementEnum.Current;
                }
                else
                {
                    StaticStatementEnum = null;
                }
            }
            if (nextMetaDecl == null && MetaBlockEnum != null)
            {
                if (MetaBlockEnum.MoveNext())
                {
                    nextMetaDecl = MetaBlockEnum.Current;
                }
                else
                {
                    MetaBlockEnum = null;
                }
            }

            ISyntaxRegion sr;

            if (nextStatStmt != null)
            {
                if (nextMetaDecl == null)
                {
                    sr = nextStatStmt;
                }
                else
                {
                    sr = nextStatStmt.First(nextMetaDecl);
                }
            }
            else if (nextMetaDecl != null)
            {
                sr = nextMetaDecl;
            }
            else
            {
                return(null);
            }

            return(sr.Location < until ? sr : null);
        }
Exemple #3
0
        public ConditionsFrame(IEnumerable<StaticStatement> ssEnum, IEnumerable<IMetaDeclaration> metaBlocks)
        {
            this.StaticStatementEnum = (IEnumerator<StaticStatement>)ssEnum.GetEnumerator();
            this.MetaBlockEnum = (IEnumerator<IMetaDeclaration>)metaBlocks.GetEnumerator();

            // opt-in: Initially check whether there are any static statements or meta decls available
            if(StaticStatementEnum.MoveNext())
                nextStatStmt = StaticStatementEnum.Current;
            else
                StaticStatementEnum = null;

            if(MetaBlockEnum.MoveNext())
                nextMetaDecl = MetaBlockEnum.Current;
            else
                MetaBlockEnum = null;
        }
Exemple #4
0
        public ConditionsFrame(IEnumerable <StaticStatement> ssEnum, IEnumerable <IMetaDeclaration> metaBlocks)
        {
            this.StaticStatementEnum = (IEnumerator <StaticStatement>)ssEnum.GetEnumerator();
            this.MetaBlockEnum       = (IEnumerator <IMetaDeclaration>)metaBlocks.GetEnumerator();

            // opt-in: Initially check whether there are any static statements or meta decls available
            if (StaticStatementEnum.MoveNext())
            {
                nextStatStmt = StaticStatementEnum.Current;
            }
            else
            {
                StaticStatementEnum = null;
            }

            if (MetaBlockEnum.MoveNext())
            {
                nextMetaDecl = MetaBlockEnum.Current;
            }
            else
            {
                MetaBlockEnum = null;
            }
        }
 static bool _checkForMatchinSpecConditions(DBlockNode m, ConditionSet cs, StaticStatement ss, ResolutionContext ctxt)
 {
     return(ss.Attributes == null || cs.IsMatching(ss.Attributes, ctxt));
 }
			bool _checkForMatchinSpecConditions(StaticStatement ss)
			{
				return ss.Location < caret && (ss.Attributes == null || cs.IsMatching(ss.Attributes, ctxt));
			}
Exemple #7
0
 public void Add(StaticStatement Statement)
 {
     StaticStatements.Add(Statement);
 }
Exemple #8
0
 bool _checkForMatchinSpecConditions(StaticStatement ss)
 {
     return(ss.Location < caret && (ss.Attributes == null || cs.IsMatching(ss.Attributes, ctxt)));
 }
 static bool _checkForMatchinSpecConditions(DBlockNode m,ConditionSet cs,StaticStatement ss, ResolutionContext ctxt)
 {
     return ss.Attributes == null || cs.IsMatching(ss.Attributes,ctxt);
 }
		bool MatchesCompilationEnv(StaticStatement ss)
		{
			return ss.Attributes == null || ctxt.CurrentContext.MatchesDeclarationEnvironment(ss.Attributes);
		}
		void HandleStaticStatement(StaticStatement ss)
		{

		}
Exemple #12
0
 bool MatchesCompilationEnv(StaticStatement ss)
 {
     return(ss.Attributes == null || ctxt.CurrentContext.MatchesDeclarationEnvironment(ss.Attributes));
 }
Exemple #13
0
 void HandleStaticStatement(StaticStatement ss)
 {
 }