javascript.js.xml 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!-- ==========================================================================\
  3. |
  4. | To learn how to make your own language parser, please check the following
  5. | link:
  6. | https://npp-user-manual.org/docs/function-list/
  7. |
  8. \=========================================================================== -->
  9. <NotepadPlus>
  10. <functionList>
  11. <!-- ================================================ [ JavaScript ] -->
  12. <parser
  13. displayName="JavaScript"
  14. id ="javascript_function"
  15. commentExpr="(?s:/\*.*?\*/)|(?m-s://.*?$)"
  16. >
  17. <function
  18. mainExpr="((^|\s+|[;\}\.])([A-Za-z_$][\w$]*\.)*[A-Za-z_$][\w$]*\s*[=:]|^|[\s;\}]+)\s*function(\s+[A-Za-z_$][\w$]*)?\s*\([^\)\(]*\)[\n\s]*\{"
  19. >
  20. <functionName>
  21. <nameExpr expr="[A-Za-z_$][\w$]*\s*[=:]|[A-Za-z_$][\w$]*\s*\(" />
  22. <nameExpr expr="[A-Za-z_$][\w$]*" />
  23. </functionName>
  24. <className>
  25. <nameExpr expr="([A-Za-z_$][\w$]*\.)*[A-Za-z_$][\w$]*\." />
  26. <nameExpr expr="([A-Za-z_$][\w$]*\.)*[A-Za-z_$][\w$]*" />
  27. </className>
  28. </function>
  29. </parser>
  30. </functionList>
  31. </NotepadPlus>