Example #1
0
		protected virtual void OnError(LexicalInfo info, String message)
		{
			String detailedMessage = String.Format(
				"{0}. On {1}, Line {2} - from {3} until {4}", message,
				info.Filename, info.Line, info.StartCol, info.EndCol);

			throw new BuilderException(info, detailedMessage);
		}
Example #2
0
		public TypeReference(LexicalInfo info, String value, TargetTypeEnum targetType) : this(info)
		{
			if (targetType == TargetTypeEnum.Link)
			{
				LinkRef = value;
			}
			else
			{
				TypeName = value;
			}
		}
Example #3
0
		public void RaiseErrorEvent( LexicalInfo info, String message )
		{
			SetHasError();

			ErrorDelegate errorDelegate = (ErrorDelegate) _events[ErrorEvent];

			if (errorDelegate != null)
			{
				errorDelegate(info, message);
			}
		}
		protected EngineConfiguration ParseContents()
		{
			AspectLanguageLexer lexer = new AspectLanguageLexer(_reader);
			AspectParser parser = new AspectParser(lexer);

			try
			{
				return parser.Parse();
			}
			catch (antlr.RecognitionException e)
			{
				int line = e.getLine();
				int startColumn = e.getColumn();
				String filename = e.getFilename();
				LexicalInfo info = new LexicalInfo(filename, line, startColumn, -1);

				throw new BuilderException(info, e.Message);
			}
		}
Example #5
0
		private Type LoadType( String typeName, String assemblyName, LexicalInfo info )
		{
			String qualifiedName = String.Format("{0}, {1}", typeName, assemblyName);

			try
			{
				return Type.GetType( qualifiedName, true, false );
			}
			catch(Exception)
			{
				Context.RaiseErrorEvent( info, "Could not load type specified " + qualifiedName );
			}

			return null;
		}
Example #6
0
		public DefinitionBase( LexicalInfo info ) : base(info)
		{
		}
Example #7
0
		protected void OnError(LexicalInfo info, string message)
		{
			messages.Append(message);
			messages.Append(';');
		}
		public InterceptorEntryDefinition( String key, LexicalInfo info ) : base(info)
		{
			Key = key;
		}
Example #9
0
		private void AssertIsInterceptor(LexicalInfo info, Type type, String message)
		{
			if (!typeof (IInterceptor).IsAssignableFrom(type))
			{
				Context.RaiseErrorEvent(info, message);
			}
		}
Example #10
0
		public MixinDefinition( LexicalInfo info ) : base(info)
		{
		}
Example #11
0
		public InterceptorDefinition( LexicalInfo info ) : base(info)
		{
		}
Example #12
0
		public TypeReference(LexicalInfo info) : base(info)
		{
		}
Example #13
0
		public TypeReference(LexicalInfo info, String typeName) : this(info)
		{
			TypeName = typeName;
		}
Example #14
0
		public MixinEntryDefinition( String key, LexicalInfo info ) : base(info)
		{
			Key = key;
		}
		public DefinitionBase Add(String key, LexicalInfo info)
		{
			MixinEntryDefinition entry = new MixinEntryDefinition( key, info );
			Add(entry);
			return entry;
		}
Example #16
0
		public ImportDirective(LexicalInfo lexInfo, String ns) : base(lexInfo)
		{
			Namespace = ns;
		}
Example #17
0
		public AspectDefinition(LexicalInfo info, String name) : base(info)
		{
			Name = name;
		}
Example #18
0
 public NodeBase(LexicalInfo info)
 {
     LexicalInfo = info;
 }
Example #19
0
		public BuilderException(LexicalInfo info, String message) : base(message)
		{
			_info = info;
		}
		public DefinitionBase Add( String key, LexicalInfo info )
		{
			InterceptorEntryDefinition entry = new InterceptorEntryDefinition( key, info );
			Add(entry);
			return entry;
		}
Example #21
0
		protected void RaiseErrorEvent(LexicalInfo info, String message)
		{
			Context.RaiseErrorEvent(info, message);
		}
Example #22
0
		public NodeBase(LexicalInfo info)
		{
			LexicalInfo = info;
		}
Example #23
0
		private void AssertNotInterface(LexicalInfo info, Type type, String message)
		{
			if (type.IsInterface)
			{
				Context.RaiseErrorEvent(info, message);
			}
		}
Example #24
0
		public PointCutDefinition(LexicalInfo info, PointCutFlags flags) : base(info)
		{
			_flags = flags;
		}
		public AssemblyReference( LexicalInfo info, String assemblyName ) : base(info)
		{
			_assemblyName = assemblyName;
		}
Example #26
0
 public MixinEntryDefinition(String key, LexicalInfo info) : base(info)
 {
     Key = key;
 }