You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
611 B

4 years ago
4 years ago
4 years ago
  1. // p≡p API C data types mapping
  2. // Copyleft (c) 2019, p≡p foundation
  3. // this file is under GNU General Public License 3.0
  4. // see LICENSE.txt
  5. // written by Volker Birk
  6. template "*", mode=name {
  7. param "abbr", "false()";
  8. if ".!=/*" {
  9. apply "..", 0, mode=name;
  10. > _
  11. }
  12. choose {
  13. when '@name="basic"'
  14. > «/*/@name»
  15. otherwise
  16. > «@name»
  17. }
  18. }
  19. function "name" {
  20. param "abbr", "false()";
  21. apply ".", mode=name with "abbr", "$abbr";
  22. }
  23. def "func:name" {
  24. param "abbr", "false()";
  25. result call "name" with "abbr", "$abbr";
  26. }