Package com.salesforce.omakase.parser

Examples of com.salesforce.omakase.parser.Source


                Location location = new Location(null, raw.line(), raw.column(), -1);
                String evaluated = provider.getValue(expression, location).toString();
                if (evaluated.isEmpty()) {
                    broadcaster.broadcast(new EmptyTerm(expression));
                } else {
                    Source source = new Source(evaluated.toString(), raw.line(), raw.column());
                    ParserFactory.termSequenceParser().parse(source, broadcaster, refiner);
                }
            }
        } catch (QuickFixException e) {
            throw new ParserException(e);
View Full Code Here


                if (AuraTextUtil.isEmptyOrWhitespace(evaluated.toString())) {
                    throw new ParserException(atRule, String.format(INVALID_EMPTY, expression));
                }

                // parse the media query expression
                Source source = new Source(evaluated.toString(), line, col);

                SingleInterestBroadcaster<MediaQueryList> single = SingleInterestBroadcaster
                        .of(MediaQueryList.class, broadcaster);

                ParserFactory.mediaQueryListParser().parse(source, single, refiner);
                Optional<MediaQueryList> queryList = single.broadcasted();

                if (queryList.isPresent()) {
                    atRule.expression(queryList.get());
                }

                // nothing should be left in the expression content
                if (!source.skipWhitepace().eof()) {
                    throw new ParserException(source, String.format(UNABLE_PARSE, source.remaining()));
                }
            }
        } catch (QuickFixException e) {
            throw new ParserException(e);
        }
View Full Code Here

TOP

Related Classes of com.salesforce.omakase.parser.Source

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.