pascal.json 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. {
  2. "program": {
  3. "prefix": "program",
  4. "body": ["PROGRAM ${1:ProgramName};", "", "BEGIN", " ${2}", "END."],
  5. "description": "Create a Pascal program"
  6. },
  7. "unit": {
  8. "prefix": "unit",
  9. "body": ["UNIT ${1:UnitName};", "", "INTERFACE", "", "${2}", "", "IMPLEMENTATION", "", "${3}", "", "BEGIN", "END."],
  10. "description": "Create a Pascal unit"
  11. },
  12. "procedure": {
  13. "prefix": "proc",
  14. "body": ["PROCEDURE ${1:ProcedureName}(${2});", "BEGIN", " ${3}", "END;"],
  15. "description": "Create a Pascal procedure"
  16. },
  17. "function": {
  18. "prefix": "func",
  19. "body": ["FUNCTION ${1:FunctionName}(${2}): ${3:Integer};", "BEGIN", " ${4}", " ${1:FunctionName} := ${5:0};", "END;"],
  20. "description": "Create a Pascal function"
  21. },
  22. "if": {
  23. "prefix": "if",
  24. "body": ["IF ${1:condition} THEN", "BEGIN", " ${2}", "END;"],
  25. "description": "Create an IF statement"
  26. },
  27. "for": {
  28. "prefix": "for",
  29. "body": ["FOR ${1:i} := ${2:start} TO ${3:end} DO", "BEGIN", " ${4}", "END;"],
  30. "description": "Create a FOR loop"
  31. },
  32. "while": {
  33. "prefix": "while",
  34. "body": ["WHILE ${1:condition} DO", "BEGIN", " ${2}", "END;"],
  35. "description": "Create a WHILE loop"
  36. },
  37. "record": {
  38. "prefix": "record",
  39. "body": ["${1:T} = RECORD", " ${2:field}: ${3:Integer};", "END;"],
  40. "description": "Create a Pascal record type"
  41. }
  42. }