geany
1.38
About: Geany is a text editor (using GTK2) with basic features of an integrated development environment (syntax highlighting, code folding, symbol name auto-completion, ...). F: office T: editor programming GTK+ IDE
![]() ![]() |
#include "general.h"
#include "debug.h"
#include "parse.h"
#include "read.h"
#include "vstring.h"
#include "keyword.h"
#include "entry.h"
#include "routines.h"
#include <string.h>
Go to the source code of this file.
Classes | |
struct | tokenInfo |
Macros | |
#define | SCOPE_SEPARATOR "::" |
#define | ACCESS_UNDEFINED NULL |
Typedefs | |
typedef enum eTokenType | tokenType |
Functions | |
static const char * | findValidAccessType (const char *const access) |
static void | initPowerShellEntry (tagEntryInfo *const e, const tokenInfo *const token, const powerShellKind kind, const char *const access) |
static void | makeSimplePowerShellTag (const tokenInfo *const token, const powerShellKind kind, const char *const access) |
static void | makeFunctionTag (const tokenInfo *const token, const vString *const arglist, const char *const access) |
static tokenInfo * | newToken (void) |
static void | deleteToken (tokenInfo *const token) |
static void | copyToken (tokenInfo *const dest, const tokenInfo *const src, bool scope) |
static void | addToScope (tokenInfo *const token, const vString *const extra) |
static bool | isIdentChar (const int c) |
static void | parseString (vString *const string, const int delimiter) |
static void | parseIdentifier (vString *const string, const int firstChar) |
static bool | isTokenFunction (vString *const name) |
static bool | isSpace (int c) |
static int | skipWhitespaces (int c) |
static int | skipSingleComment (void) |
static void | readToken (tokenInfo *const token) |
static void | enterScope (tokenInfo *const parentToken, const vString *const extraScope, const int parentKind) |
static const char * | parsePowerShellScope (tokenInfo *const token) |
static bool | parseFunction (tokenInfo *const token) |
static bool | parseVariable (tokenInfo *const token) |
static void | findPowerShellTags (void) |
parserDefinition * | PowerShellParser (void) |
Variables | |
static const char *const | accessTypes [] |
static kindDefinition | PowerShellKinds [COUNT_KIND] |
#define ACCESS_UNDEFINED NULL |
Definition at line 29 of file geany_powershell.c.
#define SCOPE_SEPARATOR "::" |
Definition at line 26 of file geany_powershell.c.
typedef enum eTokenType tokenType |
enum eTokenType |
Definition at line 50 of file geany_powershell.c.
enum powerShellKind |
Enumerator | |
---|---|
K_FUNCTION | |
K_VARIABLE | |
COUNT_KIND |
Definition at line 38 of file geany_powershell.c.
Definition at line 178 of file geany_powershell.c.
References tokenInfo::scope, SCOPE_SEPARATOR, vStringCatS(), vStringLength, and vStringValue.
Referenced by enterScope().
Definition at line 166 of file geany_powershell.c.
References tokenInfo::filePosition, tokenInfo::lineNumber, tokenInfo::parentKind, scope, tokenInfo::scope, tokenInfo::string, tokenInfo::type, and vStringCopy().
Referenced by enterScope(), parseFunction(), and parseVariable().
|
static |
Definition at line 159 of file geany_powershell.c.
References eFree(), tokenInfo::scope, tokenInfo::string, and vStringDelete().
Referenced by enterScope(), findPowerShellTags(), parseFunction(), and parseVariable().
|
static |
Definition at line 538 of file geany_powershell.c.
References addToScope(), copyToken(), deleteToken(), enterScope(), newToken(), NULL, tokenInfo::parentKind, parseFunction(), parseVariable(), readToken(), TOKEN_CLOSE_CURLY, TOKEN_EOF, TOKEN_KEYWORD, TOKEN_OPEN_CURLY, TOKEN_VARIABLE, and tokenInfo::type.
Referenced by enterScope(), findPowerShellTags(), and parseFunction().
|
static |
Definition at line 585 of file geany_powershell.c.
References deleteToken(), enterScope(), newToken(), NULL, TOKEN_EOF, and tokenInfo::type.
Referenced by PowerShellParser().
|
static |
Definition at line 81 of file geany_powershell.c.
References access, ACCESS_UNDEFINED, accessTypes, ARRAY_SIZE, and strcasecmp.
Referenced by parsePowerShellScope().
|
static |
Definition at line 97 of file geany_powershell.c.
References sTagEntryInfo::access, access, Assert, sTagEntryInfo::extensionFields, sTagEntryInfo::filePosition, tokenInfo::filePosition, initTagEntry(), sTagEntryInfo::lineNumber, tokenInfo::lineNumber, NULL, tokenInfo::parentKind, tokenInfo::scope, sTagEntryInfo::scopeKindIndex, sTagEntryInfo::scopeName, tokenInfo::string, vStringLength, and vStringValue.
Referenced by makeFunctionTag(), and makeSimplePowerShellTag().
|
static |
Definition at line 185 of file geany_powershell.c.
Referenced by parseIdentifier(), and readToken().
|
static |
Definition at line 222 of file geany_powershell.c.
Referenced by skipWhitespaces().
|
static |
Definition at line 216 of file geany_powershell.c.
References name, strcasecmp, and vStringValue.
Referenced by readToken().
|
static |
Definition at line 129 of file geany_powershell.c.
References access, sTagEntryInfo::extensionFields, initPowerShellEntry(), K_FUNCTION, makeTagEntry(), PowerShellKinds, sTagEntryInfo::signature, and vStringValue.
Referenced by parseFunction().
|
static |
Definition at line 117 of file geany_powershell.c.
References access, initPowerShellEntry(), makeTagEntry(), and PowerShellKinds.
Referenced by parseVariable().
|
static |
Definition at line 145 of file geany_powershell.c.
References tokenInfo::filePosition, getInputFilePosition(), getInputLineNumber(), tokenInfo::lineNumber, tokenInfo::parentKind, tokenInfo::scope, tokenInfo::string, TOKEN_UNDEFINED, tokenInfo::type, vStringNew(), and xMalloc.
Referenced by enterScope(), findPowerShellTags(), parseFunction(), and parseVariable().
|
static |
Definition at line 408 of file geany_powershell.c.
References access, copyToken(), deleteToken(), enterScope(), K_FUNCTION, makeFunctionTag(), newToken(), NULL, parsePowerShellScope(), readToken(), tokenInfo::string, TOKEN_CLOSE_CURLY, TOKEN_CLOSE_PAREN, TOKEN_CLOSE_SQUARE, TOKEN_COLON, TOKEN_COMMA, TOKEN_EOF, TOKEN_EQUAL_SIGN, TOKEN_IDENTIFIER, TOKEN_KEYWORD, TOKEN_OPEN_CURLY, TOKEN_OPEN_PAREN, TOKEN_OPEN_SQUARE, TOKEN_PERIOD, TOKEN_SEMICOLON, TOKEN_STRING, TOKEN_VARIABLE, tokenInfo::type, vStringCat(), vStringCatS(), vStringDelete(), vStringLast, vStringNew(), and vStringPut().
Referenced by enterScope().
|
static |
Definition at line 205 of file geany_powershell.c.
References getcFromInputFile(), isIdentChar(), ungetcToInputFile(), and vStringPut().
Referenced by readToken().
|
static |
Definition at line 373 of file geany_powershell.c.
References access, ACCESS_UNDEFINED, sVString::buffer, findValidAccessType(), sVString::length, tokenInfo::string, vStringDelete(), vStringNCopyS(), vStringNew(), and vStringValue.
Referenced by parseFunction(), and parseVariable().
|
static |
Definition at line 190 of file geany_powershell.c.
References getcFromInputFile(), and vStringPut().
Referenced by readToken().
|
static |
Definition at line 511 of file geany_powershell.c.
References access, copyToken(), deleteToken(), K_FUNCTION, K_VARIABLE, makeSimplePowerShellTag(), name, newToken(), tokenInfo::parentKind, parsePowerShellScope(), readToken(), TOKEN_EQUAL_SIGN, and tokenInfo::type.
Referenced by enterScope().
parserDefinition * PowerShellParser | ( | void | ) |
Definition at line 598 of file geany_powershell.c.
References ARRAY_SIZE, sParserDefinition::extensions, findPowerShellTags(), sParserDefinition::kindCount, sParserDefinition::kindTable, NULL, sParserDefinition::parser, parserNew(), and PowerShellKinds.
|
static |
Definition at line 253 of file geany_powershell.c.
References tokenInfo::filePosition, getcFromInputFile(), getInputFilePosition(), getInputLineNumber(), isIdentChar(), isTokenFunction(), tokenInfo::lineNumber, parseIdentifier(), parseString(), skipSingleComment(), skipToCharacterInInputFile(), skipWhitespaces(), tokenInfo::string, TOKEN_CLOSE_CURLY, TOKEN_CLOSE_PAREN, TOKEN_CLOSE_SQUARE, TOKEN_COLON, TOKEN_COMMA, TOKEN_EOF, TOKEN_EQUAL_SIGN, TOKEN_IDENTIFIER, TOKEN_KEYWORD, TOKEN_OPEN_CURLY, TOKEN_OPEN_PAREN, TOKEN_OPEN_SQUARE, TOKEN_OPERATOR, TOKEN_PERIOD, TOKEN_SEMICOLON, TOKEN_STRING, TOKEN_UNDEFINED, TOKEN_VARIABLE, tokenInfo::type, ungetcToInputFile(), and vStringClear.
Referenced by enterScope(), parseFunction(), and parseVariable().
|
static |
Definition at line 235 of file geany_powershell.c.
References getcFromInputFile(), and ungetcToInputFile().
Referenced by readToken().
|
static |
Definition at line 228 of file geany_powershell.c.
References getcFromInputFile(), and isSpace().
Referenced by readToken().
|
static |
Definition at line 30 of file geany_powershell.c.
Referenced by findValidAccessType().
|
static |
Definition at line 44 of file geany_powershell.c.
Referenced by makeFunctionTag(), makeSimplePowerShellTag(), and PowerShellParser().