# VueParser

**Kind:** Class

**Source:** [`atloria-monorepo/apps/frontend-parser/src/parsers/vue.parser.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/apps/frontend-parser/src/parsers/vue.parser.ts#L76)

**Implements:** `IParser`

## Methods

| Method | Signature | Returns |
|---|---|---|
| `initialize` | `initialize(config: ParserConfig)` | `Promise<void>` |
| `canParse` | `canParse(filePath: string)` | `boolean` |
| `parseFile` | `parseFile(filePath: string, content: string)` | `Promise<ParseResult>` |
| `parseFiles` | `parseFiles(files: ParseFileInput[])` | `Promise<ParseResult[]>` |
| `destroy` | `destroy()` | `Promise<void>` |

## Properties

| Property | Type |
|---|---|
| `name` | `string` |
| `version` | `string` |
| `supportedPatterns` | `string[]` |

## Where it refuses work

- `VueParser` stops the work with an early return when `!this.canParse(filePath)`.
- `VueParser` stops the work with an early return when `!fileContent.trim()`.
- `VueParser` stops the work with an early return when `!scriptContent && !hasTemplate`.
- `VueParser` stops the work with an early return when `!scriptContent.trim()`.

## When something fails

- `VueParser` handles failure in 4 places: it turns it into a return value in 2, logs it and continues in 1, and discards it silently in 1. A failure discarded silently leaves no trace for whoever debugs this later.
