Exemple #1
0
        private void AssignmentStatement(HashSet <SymbolEnum> followers)
        {
            var leftIdentifier = FindIdentifier(lexicalAnalyzer.IdentifierName, IdentifierClass.Vars);

            Accept(SymbolEnum.Identifier);
            Accept(SymbolEnum.Assign);
            var expressionType = NeutralizerDecoratorWithReturn(Expression, Starters.Expression, Followers.Expression, 6, followers);

            if (!TypeValidator.AreTypesAssignmentCompatible(leftIdentifier.type, expressionType))
            {
                Error(145);
            }
        }