Example #1
0
    /// <summary>
    /// Called when an <see cref="AssetAttribute"/> block is read.
    /// Checks which attribute was selected and calls <see cref="QuadrupleManager.ReadAssetAttribute(MemoryManager.AssetAttributes)"/>
    /// to handle the code generation for this call.
    /// Called by <see cref="ASSIGNMENT"/> and <see cref="FACTOR"/>.
    /// </summary>
    void ATTRIBUTE()
    {
        switch (la.kind)
        {
        case 46: {         // "value"
            Get();
            QuadrupleManager.ReadAssetAttribute(MemoryManager.AssetAttributes.number);
            break;
        }

        case 47: {         // "label"
            Get();
            QuadrupleManager.ReadAssetAttribute(MemoryManager.AssetAttributes.label);
            break;
        }

        case 48: {         // "position_x"
            Get();
            QuadrupleManager.ReadAssetAttribute(MemoryManager.AssetAttributes.x);
            break;
        }

        case 49: {         // "position_y"
            Get();
            QuadrupleManager.ReadAssetAttribute(MemoryManager.AssetAttributes.y);
            break;
        }

        case 50: {         // "width"
            Get();
            QuadrupleManager.ReadAssetAttribute(MemoryManager.AssetAttributes.width);
            break;
        }

        case 51: {         // "height"
            Get();
            QuadrupleManager.ReadAssetAttribute(MemoryManager.AssetAttributes.height);
            break;
        }

        default: SynErr(58); break;
        }
    }