Exemplo n.º 1
0
 private SmallBasicSimpleName(BlockStatement containingBlock, SmallBasicSimpleName template)
   : base(containingBlock, template) {
   if (template.rootClass != null)
     this.rootClass = (RootClassDeclaration)template.rootClass.MakeShallowCopyFor(containingBlock.ContainingNamespaceDeclaration);
   if (template.expressionToInferTargetTypeFrom != null)
     this.expressionToInferTargetTypeFrom = template.expressionToInferTargetTypeFrom.MakeCopyFor(containingBlock);
 }
Exemplo n.º 2
0
 private SmallBasicSimpleName ParseSimpleName(TokenSet followers)
   //^ requires this.currentToken == Token.Identifier;
   //^ ensures followers[this.currentToken] || this.currentToken == Token.EndOfFile;
 {
   ISourceLocation sourceLocation = this.scanner.CurrentSourceLocation;
   IName name = this.GetNameFor(sourceLocation.Source);
   SmallBasicSimpleName result = new SmallBasicSimpleName(name, sourceLocation);
   result.rootClass = this.rootClass;
   this.GetNextToken();
   //TODO: if current token is end of line, then give an error about unexpected end of line
   this.SkipTo(followers);
   return result;
 }