Skip to content

Commit

Permalink
Treat __name the same as __node (ros2#494)
Browse files Browse the repository at this point in the history
* Treat __name the same as __node

This modifies the lexer so that it will accept __name and treat it
exactly the same as __node.  __node still works in order to preserve
backwards compatibility.

Fixes ros2#258

Distribution Statement A; OPSEC #2893

Signed-off-by: P. J. Reed <preed@swri.org>

* Update dot graph for lexer

Distribution Statement A; OPSEC #2893

Signed-off-by: P. J. Reed <preed@swri.org>
  • Loading branch information
pjreed authored and hidmic committed Nov 22, 2019
1 parent 9034c40 commit 8af6f17
Show file tree
Hide file tree
Showing 4 changed files with 171 additions and 145 deletions.
2 changes: 1 addition & 1 deletion rcl/include/rcl/lexer.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ typedef enum rcl_lexeme_t
RCL_LEXEME_URL_TOPIC = 4,
/// :
RCL_LEXEME_COLON = 5,
/// __node
/// __node or __name
RCL_LEXEME_NODE = 6,
/// __ns
RCL_LEXEME_NS = 7,
Expand Down
2 changes: 1 addition & 1 deletion rcl/src/rcl/arguments.c
Original file line number Diff line number Diff line change
Expand Up @@ -1557,7 +1557,7 @@ _rcl_parse_remap_namespace_replacement(
return RCL_RET_OK;
}

/// Parse a nodename replacement rule (ex: `__node:=new_name`).
/// Parse a nodename replacement rule (ex: `__node:=new_name` or `__name:=new_name`).
/**
* \sa _rcl_parse_remap_begin_remap_rule()
*/
Expand Down
Loading

0 comments on commit 8af6f17

Please sign in to comment.