Lartu / ldpl

COBOL-like programming language that compiles to C++. With serious dinosaurs with neckties and briefcases 🦕💼
https://www.ldpl-lang.org/
Apache License 2.0
158 stars 24 forks source link

Complete COUNT #96

Closed Lartu closed 5 years ago

Lartu commented 5 years ago

At the moment the skeleton for a COUNT statement is defined within ldpl.cpp but it's not been fully written.

if(line_like("COUNT $str-expr FROM $str-expr IN $num-var", tokens, state))
    {
        if(state.section_state != 2)
            error("COUNT statement outside PROCEDURE section (\033[0m" + current_file + ":"+ to_string(line_num)+"\033[1;31m)");
        //C Code
        //TODO
        return;
    }

This should be completed.