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);
		}
Beispiel #2
0
		public TypeReference(LexicalInfo info, String value, TargetTypeEnum targetType) : this(info)
		{
			if (targetType == TargetTypeEnum.Link)
			{
				LinkRef = value;
			}
			else
			{
				TypeName = value;
			}
		}
Beispiel #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);
			}
		}
Beispiel #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;
		}
Beispiel #6
0
		public DefinitionBase( LexicalInfo info ) : base(info)
		{
		}
Beispiel #7
0
		protected void OnError(LexicalInfo info, string message)
		{
			messages.Append(message);
			messages.Append(';');
		}
		public InterceptorEntryDefinition( String key, LexicalInfo info ) : base(info)
		{
			Key = key;
		}
Beispiel #9
0
		private void AssertIsInterceptor(LexicalInfo info, Type type, String message)
		{
			if (!typeof (IInterceptor).IsAssignableFrom(type))
			{
				Context.RaiseErrorEvent(info, message);
			}
		}
Beispiel #10
0
		public MixinDefinition( LexicalInfo info ) : base(info)
		{
		}
Beispiel #11
0
		public InterceptorDefinition( LexicalInfo info ) : base(info)
		{
		}
Beispiel #12
0
		public TypeReference(LexicalInfo info) : base(info)
		{
		}
Beispiel #13
0
		public TypeReference(LexicalInfo info, String typeName) : this(info)
		{
			TypeName = typeName;
		}
		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;
		}
Beispiel #16
0
		public ImportDirective(LexicalInfo lexInfo, String ns) : base(lexInfo)
		{
			Namespace = ns;
		}
Beispiel #17
0
		public AspectDefinition(LexicalInfo info, String name) : base(info)
		{
			Name = name;
		}
Beispiel #18
0
 public NodeBase(LexicalInfo info)
 {
     LexicalInfo = info;
 }
Beispiel #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;
		}
Beispiel #21
0
		protected void RaiseErrorEvent(LexicalInfo info, String message)
		{
			Context.RaiseErrorEvent(info, message);
		}
Beispiel #22
0
		public NodeBase(LexicalInfo info)
		{
			LexicalInfo = info;
		}
Beispiel #23
0
		private void AssertNotInterface(LexicalInfo info, Type type, String message)
		{
			if (type.IsInterface)
			{
				Context.RaiseErrorEvent(info, message);
			}
		}
Beispiel #24
0
		public PointCutDefinition(LexicalInfo info, PointCutFlags flags) : base(info)
		{
			_flags = flags;
		}
		public AssemblyReference( LexicalInfo info, String assemblyName ) : base(info)
		{
			_assemblyName = assemblyName;
		}
Beispiel #26
0
 public MixinEntryDefinition(String key, LexicalInfo info) : base(info)
 {
     Key = key;
 }