Example #1
0
        internal static StepDynamicItem CreateFromSyntaxList(StepBinder binder, StepSimpleItemSyntax stepSimpleSyntax, int id)
        {
            StepSyntaxList syntaxList  = stepSimpleSyntax.Parameters;
            var            dynamicItem = new StepDynamicItem();

            dynamicItem.SyntaxList = syntaxList;
            dynamicItem.Id         = id;
            dynamicItem.Keyword    = stepSimpleSyntax.Keyword;
            dynamicItem.BindSyntaxList(binder, syntaxList, 0);
            return(dynamicItem);
        }
Example #2
0
 private StepSyntax GetItemSyntax(StepRepresentationItem item, int expectedId)
 {
     if (!_itemMap.ContainsKey(item))
     {
         var parameters = new StepSyntaxList(-1, -1, item.GetParameters(this));
         var syntax     = new StepSimpleItemSyntax(item.ItemType.GetItemTypeString(), parameters);
         _itemMap.Add(item, expectedId);
         return(syntax);
     }
     else
     {
         return(GetItemSyntax(item));
     }
 }