chore: restructure parser files

This commit is contained in:
Evan You 2023-11-24 21:53:35 +08:00
parent c11002f16a
commit 6ec85ae872
5 changed files with 12 additions and 12 deletions

View File

@ -13,7 +13,7 @@ import {
DirectiveNode
} from '../src/ast'
import { baseParse } from '../src/parser/index'
import { baseParse } from '../src/parser'
/* eslint jest/no-disabled-tests: "off" */

View File

@ -1,5 +1,5 @@
import { CompilerOptions } from './options'
import { baseParse } from './parser/index'
import { baseParse } from './parser'
import { transform, NodeTransform, DirectiveTransform } from './transform'
import { generate, CodegenResult } from './codegen'
import { RootNode } from './ast'

View File

@ -28,8 +28,8 @@ export interface ParserOptions
* configured by higher-level compilers.
*
* HTML mode adds additional logic for handling special parsing behavior in
* `<script>`, `<style>`,`<title>` and `<html>`, plus SVG and MathML
* namespaces. The logic is handled inside compiler-core for efficiency.
* `<script>`, `<style>`,`<title>` and `<textarea>`.
* The logic is handled inside compiler-core for efficiency.
*
* SFC mode treats content of all root-level tags except `<template>` as plain
* text.

View File

@ -13,8 +13,8 @@ import {
TemplateChildNode,
createRoot,
createSimpleExpression
} from '../ast'
import { ParserOptions } from '../options'
} from './ast'
import { ParserOptions } from './options'
import Tokenizer, {
CharCodes,
ParseMode,
@ -23,22 +23,22 @@ import Tokenizer, {
State,
isWhitespace,
toCharCodes
} from './Tokenizer'
} from './tokenizer'
import {
CompilerCompatOptions,
CompilerDeprecationTypes,
checkCompatEnabled,
isCompatEnabled,
warnDeprecation
} from '../compat/compatConfig'
} from './compat/compatConfig'
import { NO, extend } from '@vue/shared'
import {
ErrorCodes,
createCompilerError,
defaultOnError,
defaultOnWarn
} from '../errors'
import { forAliasRE, isCoreComponent, isStaticArgOf } from '../utils'
} from './errors'
import { forAliasRE, isCoreComponent, isStaticArgOf } from './utils'
import { decodeHTML } from 'entities/lib/decode.js'
type OptionalOptions =

View File

@ -22,8 +22,8 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
*/
import { ErrorCodes } from '../errors'
import { ElementNode, Position } from '../ast'
import { ErrorCodes } from './errors'
import { ElementNode, Position } from './ast'
/**
* Note: entities is a non-browser-build-only dependency.