Comment to clarify why we add one to the line and column recording

This commit is contained in:
Toshio Kuratomi 2015-04-10 04:01:18 -07:00
parent 79f9fbd50e
commit 2af6314f57

View file

@ -58,6 +58,7 @@ class AnsibleConstructor(Constructor):
def _node_position_info(self, node): def _node_position_info(self, node):
# the line number where the previous token has ended (plus empty lines) # the line number where the previous token has ended (plus empty lines)
# Add one so that the first line is line 1 rather than line 0
column = node.start_mark.column + 1 column = node.start_mark.column + 1
line = node.start_mark.line + 1 line = node.start_mark.line + 1