code-view.js 624 B

123456789101112131415161718192021222324252627
  1. const $code = $("#code");
  2. const $workspace = $("#workspace");
  3. const $main = $("#main");
  4. const $functions = $("#functions");
  5. const trashSound = new Audio("media/sounds/trash.mp3");
  6. const mainCodeTypes = {
  7. variable: "VARIABLE",
  8. operation: "OPERATION",
  9. attribution: "ATTRIBUTION",
  10. operator: "OPERATOR"
  11. };
  12. // Sub menu elements
  13. let universalId = {
  14. current: 0,
  15. next: function () {
  16. this.current = this.current + 1;
  17. return this.current;
  18. }
  19. };
  20. function getCurrentMainLineNumber() {
  21. // TO DO: Find a way to know in wath line the main code is
  22. return $(".code-line").length + 1;
  23. }