ccmode: Syntactic Symbols

 
 10.2 Syntactic Symbols
 ======================
 
 This section is a complete list of the syntactic symbols which appear in
 the ‘c-offsets-alist’ style variable, along with brief descriptions.
 The previous section (SeeSyntactic Analysis) states what syntactic
 symbols are and how the indentation engine uses them.
 
    More detailed descriptions of these symbols, together with snippets
 of source code to which they apply, appear in the examples in the
 subsections below.  Note that, in the interests of brevity, the anchor
 position associated with most syntactic symbols is _not_ specified.  In
 cases of doubt, type ‘C-c C-s’ on a pertinent line—this highlights the
 anchor position.
 
    The syntactic symbols which indicate brace constructs follow a
 general naming convention.  When a line begins with an open or close
 brace, its syntactic symbol will contain the suffix ‘-open’ or ‘-close’
 respectively.  The first line within the brace block construct will
 contain the suffix ‘-block-intro’.
 
    In constructs which can span several lines, a distinction is usually
 made between the first line that introduces the construct and the lines
 that continue it.  The syntactic symbols that indicate these lines will
 contain the suffixes ‘-intro’ or ‘-cont’ respectively.
 
    The best way to understand how all this works is by looking at some
 examples.  Remember that you can see the syntax of any source code line
 by using ‘C-c C-s’.
 
 ‘string’
      Inside a multiline string.  SeeLiteral Symbols.
 ‘c’
      Inside a multiline C style block comment.  SeeLiteral Symbols.
 ‘defun-open’
      Brace that opens a top-level function definition.  SeeFunction
      Symbols.
 ‘defun-close’
      Brace that closes a top-level function definition.  SeeFunction
      Symbols.
 ‘defun-block-intro’
      The first line in a top-level defun.  SeeFunction Symbols.
 ‘class-open’
      Brace that opens a class definition.  SeeClass Symbols.
 ‘class-close’
      Brace that closes a class definition.  SeeClass Symbols.
 ‘inline-open’
      Brace that opens an in-class inline method.  SeeClass Symbols.
 ‘inline-close’
      Brace that closes an in-class inline method.  SeeClass
      Symbols.
 ‘func-decl-cont’
      The region between a function definition’s argument list and the
      function opening brace (excluding K&R argument declarations).  In
      C, you cannot put anything but whitespace and comments in this
      region, however in C++ and Java, ‘throws’ declarations and other
      things can appear here.  SeeLiteral Symbols.
 ‘knr-argdecl-intro’
      First line of a K&R C argument declaration.  SeeK&R Symbols.
 ‘knr-argdecl’
      Subsequent lines in a K&R C argument declaration.  SeeK&R
      Symbols.
 ‘topmost-intro’
      The first line in a “topmost” definition.  SeeFunction
      Symbols.
 ‘topmost-intro-cont’
      Topmost definition continuation lines.  This is only used in the
      parts that aren’t covered by other symbols such as ‘func-decl-cont’
      and ‘knr-argdecl’.  SeeFunction Symbols.
 ‘annotation-top-cont’
      Topmost definition continuation lines where all previous items are
      annotations.  SeeJava Symbols.
 ‘member-init-intro’
      First line in a member initialization list.  SeeClass Symbols.
 ‘member-init-cont’
      Subsequent member initialization list lines.  SeeClass
      Symbols.
 ‘inher-intro’
      First line of a multiple inheritance list.  SeeClass Symbols.
 ‘inher-cont’
      Subsequent multiple inheritance lines.  SeeClass Symbols.
 ‘block-open’
      Statement block open brace.  SeeLiteral Symbols.
 ‘block-close’
      Statement block close brace.  SeeConditional Construct
      Symbols.
 ‘brace-list-open’
      Open brace of an enum or static array list.  SeeBrace List
      Symbols.
 ‘brace-list-close’
      Close brace of an enum or static array list.  SeeBrace List
      Symbols.
 ‘brace-list-intro’
      First line in an enum or static array list.  SeeBrace List
      Symbols.
 ‘brace-list-entry’
      Subsequent lines in an enum or static array list.  SeeBrace List
      Symbols.
 ‘brace-entry-open’
      Subsequent lines in an enum or static array list where the line
      begins with an open brace.  SeeBrace List Symbols.
 ‘statement’
      A statement.  SeeFunction Symbols.
 ‘statement-cont’
      A continuation of a statement.  SeeFunction Symbols.
 ‘annotation-var-cont’
      A continuation of a statement where all previous items are
      annotations.  SeeJava Symbols.
 ‘statement-block-intro’
      The first line in a new statement block.  SeeConditional
      Construct Symbols.
 ‘statement-case-intro’
      The first line in a case block.  SeeSwitch Statement Symbols.
 ‘statement-case-open’
      The first line in a case block that starts with a brace.  See
      Switch Statement Symbols.
 ‘substatement’
      The first line after a conditional or loop construct.  See
      Conditional Construct Symbols.
 ‘substatement-open’
      The brace that opens a substatement block.  SeeConditional
      Construct Symbols.
 ‘substatement-label’
      The first line after a conditional or loop construct if it’s a
      label.  SeeConditional Construct Symbols.
 ‘case-label’
      A label in a ‘switch’ block.  SeeSwitch Statement Symbols.
 ‘access-label’
      C++ access control label.  SeeClass Symbols.
 ‘label’
      Any other label.  SeeLiteral Symbols.
 ‘do-while-closure’
      The ‘while’ line that ends a ‘do’-‘while’ construct.  See
      Conditional Construct Symbols.
 ‘else-clause’
      The ‘else’ line of an ‘if’-‘else’ construct.  SeeConditional
      Construct Symbols.
 ‘catch-clause’
      The ‘catch’ or ‘finally’ (in Java) line of a ‘try’-‘catch’
      construct.  SeeConditional Construct Symbols.
 ‘comment-intro’
      A line containing only a comment introduction.  SeeLiteral
      Symbols.
 ‘arglist-intro’
      The first line in an argument list.  SeeParen List Symbols.
 ‘arglist-cont’
      Subsequent argument list lines when no arguments follow on the same
      line as the arglist opening paren.  SeeParen List Symbols.
 ‘arglist-cont-nonempty’
      Subsequent argument list lines when at least one argument follows
      on the same line as the arglist opening paren.  SeeParen List
      Symbols.
 ‘arglist-close’
      The solo close paren of an argument list.  SeeParen List
      Symbols.
 ‘stream-op’
      Lines continuing a stream operator (C++ only).  SeeLiteral
      Symbols.
 ‘inclass’
      The line is nested inside a class definition.  SeeClass
      Symbols.
 ‘cpp-macro’
      The start of a preprocessor macro definition.  SeeLiteral
      Symbols.
 ‘cpp-define-intro’
      The first line inside a multiline preprocessor macro if
      ‘c-syntactic-indentation-in-macros’ is set.  SeeMultiline Macro
      Symbols.
 ‘cpp-macro-cont’
      All lines inside multiline preprocessor macros if
      ‘c-syntactic-indentation-in-macros’ is ‘nil’.  SeeMultiline
      Macro Symbols.
 ‘friend’
      A C++ friend declaration.  SeeClass Symbols.
 ‘objc-method-intro’
      The first line of an Objective-C method definition.  See
      Objective-C Method Symbols.
 ‘objc-method-args-cont’
      Lines continuing an Objective-C method definition.  See
      Objective-C Method Symbols.
 ‘objc-method-call-cont’
      Lines continuing an Objective-C method call.  SeeObjective-C
      Method Symbols.
 ‘extern-lang-open’
      Brace that opens an ‘extern’ block (e.g., ‘extern "C" {...}’).
      SeeExternal Scope Symbols.
 ‘extern-lang-close’
      Brace that closes an ‘extern’ block.  SeeExternal Scope
      Symbols.
 ‘inextern-lang’
      Analogous to ‘inclass’ syntactic symbol, but used inside ‘extern’
      blocks.  SeeExternal Scope Symbols.
 ‘namespace-open’
 ‘namespace-close’
 ‘innamespace’
      These are analogous to the three ‘extern-lang’ symbols above, but
      are returned for C++ namespace blocks.  SeeExternal Scope
      Symbols.
 ‘module-open’
 ‘module-close’
 ‘inmodule’
      Analogous to the above, but for CORBA IDL ‘module’ blocks.  See
      External Scope Symbols.
 ‘composition-open’
 ‘composition-close’
 ‘incomposition’
      Analogous to the above, but for CORBA CIDL ‘composition’ blocks.
      SeeExternal Scope Symbols.
 ‘template-args-cont’
      C++ template argument list continuations.  SeeClass Symbols.
 ‘inlambda’
      Analogous to ‘inclass’ syntactic symbol, but used inside lambda
      (i.e., anonymous) functions.  Only used in Pike mode.  See
      Statement Block Symbols.
 ‘lambda-intro-cont’
      Lines continuing the header of a lambda function, i.e., between the
      ‘lambda’ keyword and the function body.  Only used in Pike mode.
      SeeStatement Block Symbols.
 ‘inexpr-statement’
      A statement block inside an expression.  The gcc C and C++
      extension for this is recognized.  It’s also used for the special
      functions that take a statement block as an argument in Pike.
      SeeStatement Block Symbols.
 ‘inexpr-class’
      A class definition inside an expression.  This is used for
      anonymous classes in Java.  It’s also used for anonymous array
      initializers in Java.  SeeJava Symbols.
 

Menu