Advertisement
Guest User

Untitled

a guest
Nov 11th, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. typedef sourceCommandType tuple<string,string,string,string>;
  2. // sourceCommands are in the format of (label, statement, op1, op2)
  3. // they can be parsed from the input text box, or from QtJsonObjects (which are read from the compiled file
  4.  
  5. class program {
  6. public:
  7. int compile(vector<sourceCommandType> sourceCommands) {
  8. foreach(sourceCommand in sourceCommands) {
  9. statement = makeStatement(sourceCommand);
  10. }
  11. }
  12.  
  13. int execute();
  14.  
  15. QtJsonObject export();
  16.  
  17. private:
  18. makeStatement(sourceCommandType sourceCommand) {
  19.  
  20. }
  21.  
  22. // various maps for converting from string identifiers to statement objects, labels, etc
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement