File: indent_macro_comment.v

package info (click to toggle)
verilog-mode 20161124.fd230e6-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 3,764 kB
  • ctags: 5,143
  • sloc: lisp: 12,430; perl: 293; makefile: 146; sh: 35; fortran: 2
file content (41 lines) | stat: -rw-r--r-- 1,326 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// issue 935 - Incorrect indentation after multi-line `define macro
`ifndef _ABC
  `define _ABC

  `define TEMPA 1

// CORRECT INDENTATION

  `define DEF1 { "a" \
                 , "b" \
                 }

    // Incorrect indentation (v1) after multi-line macro definition above

  `define TEMPB (`TEMPA >= 0 ? 0 : 1)

    // Incorrect indentation (v1) *strangely, not yet affected by the >= chars above*

  `define DEF2 { "a" \
                 , "b" \
                 }

                           // Incorrect indentation (v2) *NOW aligns to the
                           // >= sign in `define TEMPB above (which it should not)
                           // Looks like the multi-line macro definition DEF2
                           // above caused this second version of incorrect
                           // indentation*

  `define TEMPC ((`TEMPA + 1_000_000) >= 0 ? 0 : 1)

    // BACK TO Incorrect indentation (v1)!

  `define DEF3 { "a" \
                 , "b" \
                 }

                           // BACK TO Incorrect indentation (v2)! Surprisingly
                           // the >= sign in `define TEMPC macro did not affect
                           // the indentation this time; but the indentation
                           // returned to (v2) as set by that sign in `define TEMPB
`endif