Exemple #1
0
 public void IsPropertyDefined(GoStruct goStruct)
 {
     foreach (GoProperty prop in goStruct._properties.Values)
     {
         prop.FailIfUndefinedInParser(this);
     }
 }
Exemple #2
0
 public void NavigateDependenciesInto(GoStruct goStruct, Stack <GoObject> pathTaken)
 {
     foreach (GoProperty goProp in goStruct._properties.Values)
     {
         goProp.NavigateDependenciesTo(pathTaken, this);
     }
 }
Exemple #3
0
 public void AddGoPropertyToNavigationQueue(GoStruct goStruct, Queue <GoObject> navigationQueue)
 {
     foreach (GoProperty goProp in goStruct._properties.Values)
     {
         goProp.AddToTypeNavigationQueue(navigationQueue, this);
     }
 }
Exemple #4
0
        private void CallRoutineSTR(out GoStruct currentGoStruct)
        {
            if (_iterator.Current.TokenType == TokenType.Id)
            {
                var matchToken           = MatchToken(TokenType.Id);
                var currentGoPropertyKey = matchToken.Value;

                CallRoutineTY(out GoProperty currentGoStructProperty);

                CallRoutineSTR(out currentGoStruct);

                try
                {
                    currentGoStruct._properties.Add(currentGoPropertyKey, currentGoStructProperty);
                }
                catch (ArgumentException ex)
                {
                    throw new ParserPropertyDefinedTwiceException(matchToken, ex.Message);
                }
            }
            else
            {
                currentGoStruct = new GoStruct();
            }
        }