manual_tree.pl 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. $manual_tree = { 'cmdname' => 'multitable',
  2. 'args' => [
  3. { 'type' => 'block_line_arg',
  4. 'contents' => [
  5. { 'text' => ' ' },
  6. { 'type' => 'bracketed',
  7. 'contents' => [
  8. {'text' => 'aaaa'},
  9. ]
  10. },
  11. { 'text' => ' ' },
  12. { 'type' => 'bracketed',
  13. 'contents' => [
  14. {'text' => 'xx'},
  15. {'cmdname' => 'b',
  16. 'args' => [
  17. {
  18. 'type' => 'brace_command_arg',
  19. 'contents' => [
  20. { 'text' => 'rr' }
  21. ]
  22. }
  23. ]
  24. }
  25. ]
  26. },
  27. {'text' => " ccc\n"},
  28. ],
  29. } ],
  30. 'extra' => { 'number_of_columns' => 3,
  31. 'end_command' => {} },
  32. 'contents' => [
  33. { 'type' => 'multitable_title',
  34. 'contents' => [
  35. { 'type' => 'paragraph',
  36. 'contents' => [
  37. { 'text' => "title" },
  38. { 'cmdname' => 'verb',
  39. 'args' => [ {
  40. 'contents' => [
  41. { 'text' => ' in verb } ',
  42. 'type' => 'raw' }
  43. ],
  44. 'type' => 'brace_command_arg',
  45. } ],
  46. 'type' => ':'
  47. },
  48. { 'cmdname' => '@'},
  49. { 'text' => ".\n"},
  50. ]
  51. }
  52. ]
  53. },
  54. { 'cmdname' => 'item',
  55. 'type' => 'multitable_row',
  56. 'extra' => {'row_number' => 1},
  57. 'contents' => [
  58. {
  59. 'type' => 'multitable_cell',
  60. 'extra' => {'col_number' => 1,
  61. 'row_number' => 1},
  62. 'contents' => [ {'text' => " \n" } ]
  63. }
  64. ]
  65. },
  66. { 'cmdname' => 'end',
  67. 'extra' => {'command_argument' => 'multitable',
  68. 'text_arg' => 'multitable',
  69. },
  70. 'args' => [
  71. {
  72. 'contents' => [
  73. {
  74. 'parent' => {},
  75. 'text' => ' ',
  76. 'type' => 'empty_spaces_after_command'
  77. },
  78. {
  79. 'parent' => {},
  80. 'text' => 'multitable'
  81. },
  82. {
  83. 'parent' => {},
  84. 'text' => '
  85. ',
  86. 'type' => 'spaces_at_end'
  87. }
  88. ],
  89. 'parent' => {},
  90. 'type' => 'misc_line_arg'
  91. }
  92. ],
  93. }
  94. ]
  95. };
  96. $manual_tree_result = '@multitable {aaaa} {xx@b{rr}} ccc
  97. title@verb{: in verb } :}@@.
  98. @item
  99. @end multitable
  100. ';
  101. 1;