Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

26 Zeilen
644 B

vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
  1. #pragma once
  2. #include <vector>
  3. #include <map>
  4. #include <string>
  5. namespace molasses {
  6. // We will always want symbols to be convertible to int for dictionary lookups
  7. struct symbol {
  8. int id;
  9. std::string file_name;
  10. int line;
  11. int column;
  12. [[no_unique_address]] bool is_string;
  13. operator int() const {
  14. return id;
  15. }
  16. };
  17. struct lexed_output {
  18. std::map<int, std::string> dictionary;
  19. std::vector<symbol> symbols;
  20. };
  21. lexed_output lex(const std::string & file_name,const std::string & source);
  22. lexed_output concatenate(const lexed_output& lhs, const lexed_output& rhs);
  23. }